From owner-svn-src-head@freebsd.org Sun Aug 11 06:26:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFF37B0FC5; Sun, 11 Aug 2019 06:26:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 465prv6f5tz4cb9; Sun, 11 Aug 2019 06:26:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C126DA174; Sun, 11 Aug 2019 06:26:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7B6Q79a052539; Sun, 11 Aug 2019 06:26:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7B6Q40J052521; Sun, 11 Aug 2019 06:26:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201908110626.x7B6Q40J052521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 11 Aug 2019 06:26:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350855 - head/contrib/bzip2 X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/contrib/bzip2 X-SVN-Commit-Revision: 350855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 06:26:08 -0000 Author: delphij Date: Sun Aug 11 06:26:03 2019 New Revision: 350855 URL: https://svnweb.freebsd.org/changeset/base/350855 Log: Upgrade to Bzip2 version 1.0.8. MFC after: 3 days Modified: head/contrib/bzip2/CHANGES head/contrib/bzip2/LICENSE head/contrib/bzip2/README head/contrib/bzip2/README.COMPILATION.PROBLEMS head/contrib/bzip2/blocksort.c head/contrib/bzip2/bzip2.1 head/contrib/bzip2/bzip2.c head/contrib/bzip2/bzip2recover.c head/contrib/bzip2/bzlib.c head/contrib/bzip2/bzlib.h head/contrib/bzip2/bzlib_private.h head/contrib/bzip2/compress.c head/contrib/bzip2/crctable.c head/contrib/bzip2/decompress.c head/contrib/bzip2/huffman.c head/contrib/bzip2/randtable.c head/contrib/bzip2/spewG.c head/contrib/bzip2/unzcrash.c Directory Properties: head/contrib/bzip2/ (props changed) Modified: head/contrib/bzip2/CHANGES ============================================================================== --- head/contrib/bzip2/CHANGES Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/CHANGES Sun Aug 11 06:26:03 2019 (r350855) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -338,3 +338,19 @@ Security fix only. Fixes CERT-FI 20469 as it applies * bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) * Make sure nSelectors is not out of range (CVE-2019-12900) + +1.0.8 (13 Jul 19) +~~~~~~~~~~~~~~~~~ + +* Accept as many selectors as the file format allows. + This relaxes the fix for CVE-2019-12900 from 1.0.7 + so that bzip2 allows decompression of bz2 files that + use (too) many selectors again. + +* Fix handling of large (> 4GB) files on Windows. + +* Cleanup of bzdiff and bzgrep scripts so they don't use + any bash extensions and handle multiple archives correctly. + +* There is now a bz2-files testsuite at + https://sourceware.org/git/bzip2-tests.git Modified: head/contrib/bzip2/LICENSE ============================================================================== --- head/contrib/bzip2/LICENSE Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/LICENSE Sun Aug 11 06:26:03 2019 (r350855) @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2010 Julian R Seward. All +documentation, are copyright (C) 1996-2019 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37,6 +37,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, jseward@acm.org -bzip2/libbzip2 version 1.0.7 of 27 June 2019 +bzip2/libbzip2 version 1.0.8 of 13 July 2019 -------------------------------------------------------------------------- Modified: head/contrib/bzip2/README ============================================================================== --- head/contrib/bzip2/README Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/README Sun Aug 11 06:26:03 2019 (r350855) @@ -6,8 +6,8 @@ This version is fully compatible with the previous pub This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.7 of 27 June 2019 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -165,8 +165,8 @@ WHAT'S NEW IN 1.0.x ? See the CHANGES file. -I hope you find bzip2 useful. Feel free to contact me at - jseward@acm.org +I hope you find bzip2 useful. Feel free to contact the developers at + bzip2-devel@sourceware.org if you have any suggestions or queries. Many people mailed me with comments, suggestions and patches after the releases of bzip-0.15, bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, @@ -193,3 +193,4 @@ Cambridge, UK. 10 December 2007 (bzip2, version 1.0.5) 6 Sept 2010 (bzip2, version 1.0.6) 27 June 2019 (bzip2, version 1.0.7) +13 July 2019 (bzip2, version 1.0.8) Modified: head/contrib/bzip2/README.COMPILATION.PROBLEMS ============================================================================== --- head/contrib/bzip2/README.COMPILATION.PROBLEMS Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/README.COMPILATION.PROBLEMS Sun Aug 11 06:26:03 2019 (r350855) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.7 of 27 June 2019 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/blocksort.c ============================================================================== --- head/contrib/bzip2/blocksort.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/blocksort.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/bzip2.1 ============================================================================== --- head/contrib/bzip2/bzip2.1 Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/bzip2.1 Sun Aug 11 06:26:03 2019 (r350855) @@ -1,6 +1,6 @@ .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.8 .br bzcat \- decompresses files to stdout .br @@ -404,7 +404,7 @@ I/O error messages are not as helpful as they could be tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.7 of +This manual page pertains to version 1.0.8 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions Modified: head/contrib/bzip2/bzip2.c ============================================================================== --- head/contrib/bzip2/bzip2.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/bzip2.c Sun Aug 11 06:26:03 2019 (r350855) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -128,12 +128,12 @@ #if BZ_LCCWIN32 # include # include -# include +# include # define NORETURN /**/ # define PATH_SEP '\\' -# define MY_LSTAT _stat -# define MY_STAT _stat +# define MY_LSTAT _stati64 +# define MY_STAT _stati64 # define MY_S_ISREG(x) ((x) & _S_IFREG) # define MY_S_ISDIR(x) ((x) & _S_IFDIR) @@ -748,8 +748,8 @@ void panic ( const Char* s ) fprintf ( stderr, "\n%s: PANIC -- internal consistency error:\n" "\t%s\n" - "\tThis is a BUG. Please report it to me at:\n" - "\tjseward@acm.org\n", + "\tThis is a BUG. Please report it to:\n" + "\tbzip2-devel@sourceware.org\n", progName, s ); showFileNames(); cleanUpAndFail( 3 ); @@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (1) and (2).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (1)\n" - " or (2), feel free to report it to me at: jseward@acm.org.\n" + " or (2), feel free to report it to: bzip2-devel@sourceware.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (2) and (3).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (2)\n" - " or (3), feel free to report it to me at: jseward@acm.org.\n" + " or (3), feel free to report it to: bzip2-devel@sourceware.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -1605,7 +1605,7 @@ void license ( void ) "bzip2, a block-sorting file compressor. " "Version %s.\n" " \n" - " Copyright (C) 1996-2010 by Julian Seward.\n" + " Copyright (C) 1996-2019 by Julian Seward.\n" " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" Modified: head/contrib/bzip2/bzip2recover.c ============================================================================== --- head/contrib/bzip2/bzip2recover.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/bzip2recover.c Sun Aug 11 06:26:03 2019 (r350855) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -314,7 +314,7 @@ Int32 main ( Int32 argc, Char** argv ) inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.8: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", Modified: head/contrib/bzip2/bzlib.c ============================================================================== --- head/contrib/bzip2/bzlib.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/bzlib.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -47,12 +47,12 @@ void BZ2_bz__AssertH__fail ( int errcode ) fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to me at: jseward@acm.org. If this happened\n" + "Please report it to: bzip2-devel@sourceware.org. If this happened\n" "when you were using some program which uses libbzip2 as a\n" "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" "timely and accurate bug reports eventually lead to higher\n" - "quality software. Thanks. Julian Seward, 10 December 2007.\n\n", + "quality software. Thanks.\n\n", errcode, BZ2_bzlibVersion() ); Modified: head/contrib/bzip2/bzlib.h ============================================================================== --- head/contrib/bzip2/bzlib.h Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/bzlib.h Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/bzlib_private.h ============================================================================== --- head/contrib/bzip2/bzlib_private.h Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/bzlib_private.h Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.7, 27-Jun-2019" +#define BZ_VERSION "1.0.8, 13-Jul-2019" typedef char Char; typedef unsigned char Bool; Modified: head/contrib/bzip2/compress.c ============================================================================== --- head/contrib/bzip2/compress.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/compress.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -454,7 +454,7 @@ void sendMTFValues ( EState* s ) AssertH( nGroups < 8, 3002 ); AssertH( nSelectors < 32768 && - nSelectors <= (2 + (900000 / BZ_G_SIZE)), + nSelectors <= BZ_MAX_SELECTORS, 3003 ); Modified: head/contrib/bzip2/crctable.c ============================================================================== --- head/contrib/bzip2/crctable.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/crctable.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/decompress.c ============================================================================== --- head/contrib/bzip2/decompress.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/decompress.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -287,7 +287,7 @@ Int32 BZ2_decompress ( DState* s ) GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); - if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR); + if (nSelectors < 1) RETURN(BZ_DATA_ERROR); for (i = 0; i < nSelectors; i++) { j = 0; while (True) { @@ -296,8 +296,14 @@ Int32 BZ2_decompress ( DState* s ) j++; if (j >= nGroups) RETURN(BZ_DATA_ERROR); } - s->selectorMtf[i] = j; + /* Having more than BZ_MAX_SELECTORS doesn't make much sense + since they will never be used, but some implementations might + "round up" the number of selectors, so just ignore those. */ + if (i < BZ_MAX_SELECTORS) + s->selectorMtf[i] = j; } + if (nSelectors > BZ_MAX_SELECTORS) + nSelectors = BZ_MAX_SELECTORS; /*--- Undo the MTF values for the selectors. ---*/ { Modified: head/contrib/bzip2/huffman.c ============================================================================== --- head/contrib/bzip2/huffman.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/huffman.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/randtable.c ============================================================================== --- head/contrib/bzip2/randtable.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/randtable.c Sun Aug 11 06:26:03 2019 (r350855) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/spewG.c ============================================================================== --- head/contrib/bzip2/spewG.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/spewG.c Sun Aug 11 06:26:03 2019 (r350855) @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: head/contrib/bzip2/unzcrash.c ============================================================================== --- head/contrib/bzip2/unzcrash.c Sun Aug 11 06:22:53 2019 (r350854) +++ head/contrib/bzip2/unzcrash.c Sun Aug 11 06:26:03 2019 (r350855) @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.7 of 27 June 2019 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. From owner-svn-src-head@freebsd.org Sun Aug 11 15:22:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A245BB884; Sun, 11 Aug 2019 15:22:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4662mG282Kz43NF; Sun, 11 Aug 2019 15:22:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B2EE183DD; Sun, 11 Aug 2019 15:22:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7BFMsjC073069; Sun, 11 Aug 2019 15:22:54 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BFMs5s073068; Sun, 11 Aug 2019 15:22:54 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908111522.x7BFMs5s073068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 11 Aug 2019 15:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350857 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 350857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 15:22:54 -0000 Author: asomers Date: Sun Aug 11 15:22:53 2019 New Revision: 350857 URL: https://svnweb.freebsd.org/changeset/base/350857 Log: ping6: Revoke root privilege earlier It can be done just after the sockets have been created. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21213 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Sun Aug 11 08:24:56 2019 (r350856) +++ head/sbin/ping6/ping6.c Sun Aug 11 15:22:53 2019 (r350857) @@ -659,6 +659,12 @@ main(int argc, char *argv[]) err(1, "socket srecv"); freeaddrinfo(res); + /* revoke root privilege */ + if (seteuid(getuid()) != 0) + err(1, "seteuid() failed"); + if (setuid(getuid()) != 0) + err(1, "setuid() failed"); + /* set the source address if specified. */ if ((options & F_SRCADDR) != 0) { /* properly fill sin6_scope_id */ @@ -728,12 +734,6 @@ main(int argc, char *argv[]) err(1, "setsockopt(IPV6_RECVRTHDRDSTOPTS)"); #endif } - - /* revoke root privilege */ - if (seteuid(getuid()) != 0) - err(1, "seteuid() failed"); - if (setuid(getuid()) != 0) - err(1, "setuid() failed"); if ((options & F_FLOOD) && (options & F_INTERVAL)) errx(1, "-f and -i incompatible options"); From owner-svn-src-head@freebsd.org Sun Aug 11 15:27:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 421A2BB941; Sun, 11 Aug 2019 15:27:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4662sg0mWtz43WV; Sun, 11 Aug 2019 15:27:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBE75183E1; Sun, 11 Aug 2019 15:27:34 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7BFRYqh073328; Sun, 11 Aug 2019 15:27:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BFRYic073327; Sun, 11 Aug 2019 15:27:34 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908111527.x7BFRYic073327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 11 Aug 2019 15:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350858 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 350858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 15:27:35 -0000 Author: asomers Date: Sun Aug 11 15:27:34 2019 New Revision: 350858 URL: https://svnweb.freebsd.org/changeset/base/350858 Log: ping6: Add missing static keyword for a global variable This fixes -Wmissing-variable-declarations error when compiled with WARNS=6. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21214 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Sun Aug 11 15:22:53 2019 (r350857) +++ head/sbin/ping6/ping6.c Sun Aug 11 15:27:34 2019 (r350858) @@ -198,7 +198,7 @@ struct tv32 { #define F_DONTFRAG 0x1000000 #define F_NOUSERDATA (F_NODEADDR | F_FQDN | F_FQDNOLD | F_SUPTYPES) #define F_WAITTIME 0x2000000 -u_int options; +static u_int options; #define IN6LEN sizeof(struct in6_addr) #define SA6LEN sizeof(struct sockaddr_in6) From owner-svn-src-head@freebsd.org Sun Aug 11 15:36:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EDCEBBC52; Sun, 11 Aug 2019 15:36:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46633l22XQz4440; Sun, 11 Aug 2019 15:36:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0EB5D185A4; Sun, 11 Aug 2019 15:36:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7BFaIk4079557; Sun, 11 Aug 2019 15:36:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BFaItn079556; Sun, 11 Aug 2019 15:36:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908111536.x7BFaItn079556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 11 Aug 2019 15:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350859 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 350859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 15:36:19 -0000 Author: asomers Date: Sun Aug 11 15:36:18 2019 New Revision: 350859 URL: https://svnweb.freebsd.org/changeset/base/350859 Log: ping6: Remove unnecessary level of indirection from dnsdecode() parameter The `sp' pointer doesn't need to be modified in the caller of dnsdecode(). This fixes -Wcast-qual error (`must have all intermediate pointers const qualified to be safe') when compiled with WARNS=6. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21215 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Sun Aug 11 15:27:34 2019 (r350858) +++ head/sbin/ping6/ping6.c Sun Aug 11 15:36:18 2019 (r350859) @@ -279,7 +279,7 @@ static void pr_suptypes(struct icmp6_nodeinfo *, size static void pr_nodeaddr(struct icmp6_nodeinfo *, int); static int myechoreply(const struct icmp6_hdr *); static int mynireply(const struct icmp6_nodeinfo *); -static char *dnsdecode(const u_char **, const u_char *, const u_char *, +static char *dnsdecode(const u_char *, const u_char *, const u_char *, char *, size_t); static void pr_pack(u_char *, int, struct msghdr *); static void pr_exthdrs(struct msghdr *); @@ -1431,7 +1431,7 @@ mynireply(const struct icmp6_nodeinfo *nip) } static char * -dnsdecode(const u_char **sp, const u_char *ep, const u_char *base, char *buf, +dnsdecode(const u_char *sp, const u_char *ep, const u_char *base, char *buf, size_t bufsiz) /*base for compressed name*/ { @@ -1441,14 +1441,14 @@ dnsdecode(const u_char **sp, const u_char *ep, const u const u_char *comp; int l; - cp = *sp; + cp = sp; *buf = '\0'; if (cp >= ep) return NULL; while (cp < ep) { i = *cp; - if (i == 0 || cp != *sp) { + if (i == 0 || cp != sp) { if (strlcat((char *)buf, ".", bufsiz) >= bufsiz) return NULL; /*result overrun*/ } @@ -1462,7 +1462,7 @@ dnsdecode(const u_char **sp, const u_char *ep, const u return NULL; comp = base + (i & 0x3f); - if (dnsdecode(&comp, cp, base, cresult, + if (dnsdecode(comp, cp, base, cresult, sizeof(cresult)) == NULL) return NULL; if (strlcat(buf, cresult, bufsiz) >= bufsiz) @@ -1486,7 +1486,7 @@ dnsdecode(const u_char **sp, const u_char *ep, const u if (i != 0) return NULL; /*not terminated*/ cp++; - *sp = cp; + sp = cp; return buf; } @@ -1679,7 +1679,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) } else { i = 0; while (cp < end) { - if (dnsdecode((const u_char **)&cp, end, + if (dnsdecode((const u_char *)cp, end, (const u_char *)(ni + 1), dnsname, sizeof(dnsname)) == NULL) { printf("???"); @@ -2461,7 +2461,7 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end) } printf(", subject=%s", niqcode[ni->ni_code]); cp = (const u_char *)(ni + 1); - if (dnsdecode(&cp, end, NULL, dnsname, + if (dnsdecode(cp, end, NULL, dnsname, sizeof(dnsname)) != NULL) printf("(%s)", dnsname); else From owner-svn-src-head@freebsd.org Sun Aug 11 15:44:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3256DBBF14; Sun, 11 Aug 2019 15:44: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4663FK0KbPz44Sp; Sun, 11 Aug 2019 15:44:37 +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 DCD3D18767; Sun, 11 Aug 2019 15:44: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 x7BFiaS7085572; Sun, 11 Aug 2019 15:44:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BFiaLJ085571; Sun, 11 Aug 2019 15:44:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908111544.x7BFiaLJ085571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Aug 2019 15:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350860 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 350860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 15:44:37 -0000 Author: kib Date: Sun Aug 11 15:44:36 2019 New Revision: 350860 URL: https://svnweb.freebsd.org/changeset/base/350860 Log: wait(2): split long line by using .Fo/.Fa instead of .Ft. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Sun Aug 11 15:36:18 2019 (r350859) +++ head/lib/libc/sys/wait.2 Sun Aug 11 15:44:36 2019 (r350860) @@ -58,7 +58,13 @@ .Ft pid_t .Fn wait4 "pid_t wpid" "int *status" "int options" "struct rusage *rusage" .Ft pid_t -.Fn wait6 "idtype_t idtype" "id_t id" "int *status" "int options" "struct __wrusage *wrusage" "siginfo_t *infop" +.Fo wait6 +.Fa "idtype_t idtype" "id_t id" +.Fa "int *status" +.Fa "int options" +.Fa "struct __wrusage *wrusage" +.Fa "siginfo_t *infop" +.Fc .Sh DESCRIPTION The .Fn wait From owner-svn-src-head@freebsd.org Sun Aug 11 15:47:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D84CEBBFC4; Sun, 11 Aug 2019 15:47:48 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4663K05JZ7z44bd; Sun, 11 Aug 2019 15:47:48 +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 984A618769; Sun, 11 Aug 2019 15:47:48 +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 x7BFlmId085764; Sun, 11 Aug 2019 15:47:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BFlm8X085763; Sun, 11 Aug 2019 15:47:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908111547.x7BFlm8X085763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Aug 2019 15:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350861 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 350861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 15:47:48 -0000 Author: kib Date: Sun Aug 11 15:47:48 2019 New Revision: 350861 URL: https://svnweb.freebsd.org/changeset/base/350861 Log: wait(2): clarify reparenting of children of the exiting process. Point to the existence of reapers and mention that init is the default reaper. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Sun Aug 11 15:44:36 2019 (r350860) +++ head/lib/libc/sys/wait.2 Sun Aug 11 15:47:48 2019 (r350861) @@ -28,7 +28,7 @@ .\" @(#)wait.2 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 24, 2018 +.Dd August 11, 2019 .Dt WAIT 2 .Os .Sh NAME @@ -511,8 +511,12 @@ A status of 0 indicates normal termination. .Pp If a parent process terminates without waiting for all of its child processes to terminate, -the remaining child processes are assigned the parent -process 1 ID (the init process ID). +the remaining child processes are re-assigned to the reaper +of the exiting process as the parent, see +.Xr procctl 2 +.Dv PROC_REAP_ACQUIRE . +If no specific reaper was assigned, the process with ID 1, the init process, +becomes the parent of the orphaned children by default. .Pp If a signal is caught while any of the .Fn wait @@ -648,6 +652,7 @@ do not specify a valid set of processes. .El .Sh SEE ALSO .Xr _exit 2 , +.Xr procctl 2 , .Xr ptrace 2 , .Xr sigaction 2 , .Xr exit 3 , From owner-svn-src-head@freebsd.org Sun Aug 11 19:16:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58367BFCD3; Sun, 11 Aug 2019 19:16:08 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4667xN1hkkz4GZs; Sun, 11 Aug 2019 19:16:08 +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 1BB5F1ACF4; Sun, 11 Aug 2019 19:16:08 +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 x7BJG7Un012790; Sun, 11 Aug 2019 19:16:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BJG7xZ012787; Sun, 11 Aug 2019 19:16:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908111916.x7BJG7xZ012787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Aug 2019 19:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350862 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 350862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 19:16:08 -0000 Author: kib Date: Sun Aug 11 19:16:07 2019 New Revision: 350862 URL: https://svnweb.freebsd.org/changeset/base/350862 Log: Only enable COMPAT_43 changes for syscalls ABI for a.out processes. Reviewed by: imp, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21200 Modified: head/sys/kern/kern_prot.c head/sys/kern/kern_sig.c head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Sun Aug 11 15:47:48 2019 (r350861) +++ head/sys/kern/kern_prot.c Sun Aug 11 19:16:07 2019 (r350862) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -101,7 +102,8 @@ sys_getpid(struct thread *td, struct getpid_args *uap) td->td_retval[0] = p->p_pid; #if defined(COMPAT_43) - td->td_retval[1] = kern_getppid(td); + if (SV_PROC_FLAG(p, SV_AOUT)) + td->td_retval[1] = kern_getppid(td); #endif return (0); } Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Aug 11 15:47:48 2019 (r350861) +++ head/sys/kern/kern_sig.c Sun Aug 11 19:16:07 2019 (r350862) @@ -630,7 +630,7 @@ sigonstack(size_t sp) if ((td->td_pflags & TDP_ALTSTACK) == 0) return (0); #if defined(COMPAT_43) - if (td->td_sigstk.ss_size == 0) + if (SV_PROC_FLAG(td->td_proc, SV_AOUT) && td->td_sigstk.ss_size == 0) return ((td->td_sigstk.ss_flags & SS_ONSTACK) != 0); #endif return (sp >= (size_t)td->td_sigstk.ss_sp && Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun Aug 11 15:47:48 2019 (r350861) +++ head/sys/kern/uipc_syscalls.c Sun Aug 11 19:16:07 2019 (r350862) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -292,7 +293,8 @@ accept1(td, s, uname, anamelen, flags) if (error == 0 && uname != NULL) { #ifdef COMPAT_OLDSOCK - if (flags & ACCEPT4_COMPAT) + if (SV_PROC_FLAG(td->td_proc, SV_AOUT) && + (flags & ACCEPT4_COMPAT) != 0) ((struct osockaddr *)name)->sa_family = name->sa_family; #endif @@ -691,7 +693,8 @@ sendit(struct thread *td, int s, struct msghdr *mp, in if (mp->msg_control) { if (mp->msg_controllen < sizeof(struct cmsghdr) #ifdef COMPAT_OLDSOCK - && mp->msg_flags != MSG_COMPAT + && (mp->msg_flags != MSG_COMPAT || + !SV_PROC_FLAG(td->td_proc, SV_AOUT)) #endif ) { error = EINVAL; @@ -702,7 +705,8 @@ sendit(struct thread *td, int s, struct msghdr *mp, in if (error != 0) goto bad; #ifdef COMPAT_OLDSOCK - if (mp->msg_flags == MSG_COMPAT) { + if (mp->msg_flags == MSG_COMPAT && + SV_PROC_FLAG(td->td_proc, SV_AOUT)) { struct cmsghdr *cm; M_PREPEND(control, sizeof(*cm), M_WAITOK); @@ -829,7 +833,8 @@ sys_sendto(struct thread *td, struct sendto_args *uap) msg.msg_iovlen = 1; msg.msg_control = 0; #ifdef COMPAT_OLDSOCK - msg.msg_flags = 0; + if (SV_PROC_FLAG(td->td_proc, SV_AOUT)) + msg.msg_flags = 0; #endif aiov.iov_base = __DECONST(void *, uap->buf); aiov.iov_len = uap->len; @@ -890,7 +895,8 @@ sys_sendmsg(struct thread *td, struct sendmsg_args *ua return (error); msg.msg_iov = iov; #ifdef COMPAT_OLDSOCK - msg.msg_flags = 0; + if (SV_PROC_FLAG(td->td_proc, SV_AOUT)) + msg.msg_flags = 0; #endif error = sendit(td, uap->s, &msg, uap->flags); free(iov, M_IOV); @@ -979,7 +985,8 @@ kern_recvit(struct thread *td, int s, struct msghdr *m /* save sa_len before it is destroyed by MSG_COMPAT */ len = MIN(len, fromsa->sa_len); #ifdef COMPAT_OLDSOCK - if (mp->msg_flags & MSG_COMPAT) + if ((mp->msg_flags & MSG_COMPAT) != 0 && + SV_PROC_FLAG(td->td_proc, SV_AOUT)) ((struct osockaddr *)fromsa)->sa_family = fromsa->sa_family; #endif @@ -1002,7 +1009,8 @@ kern_recvit(struct thread *td, int s, struct msghdr *m * If we receive rights, trim the cmsghdr; anything else * is tossed. */ - if (control && mp->msg_flags & MSG_COMPAT) { + if (control && (mp->msg_flags & MSG_COMPAT) != 0 && + SV_PROC_FLAG(td->td_proc, SV_AOUT)) { if (mtod(control, struct cmsghdr *)->cmsg_level != SOL_SOCKET || mtod(control, struct cmsghdr *)->cmsg_type != @@ -1061,7 +1069,8 @@ recvit(struct thread *td, int s, struct msghdr *mp, vo if (namelenp != NULL) { error = copyout(&mp->msg_namelen, namelenp, sizeof (socklen_t)); #ifdef COMPAT_OLDSOCK - if (mp->msg_flags & MSG_COMPAT) + if ((mp->msg_flags & MSG_COMPAT) != 0 && + SV_PROC_FLAG(td->td_proc, SV_AOUT)) error = 0; /* old recvfrom didn't check */ #endif } @@ -1167,7 +1176,8 @@ sys_recvmsg(struct thread *td, struct recvmsg_args *ua return (error); msg.msg_flags = uap->flags; #ifdef COMPAT_OLDSOCK - msg.msg_flags &= ~MSG_COMPAT; + if (SV_PROC_FLAG(td->td_proc, SV_AOUT)) + msg.msg_flags &= ~MSG_COMPAT; #endif uiov = msg.msg_iov; msg.msg_iov = iov; @@ -1349,7 +1359,7 @@ getsockname1(struct thread *td, struct getsockname_arg if (len != 0) { #ifdef COMPAT_OLDSOCK - if (compat) + if (compat && SV_PROC_FLAG(td->td_proc, SV_AOUT)) ((struct osockaddr *)sa)->sa_family = sa->sa_family; #endif error = copyout(sa, uap->asa, (u_int)len); @@ -1435,7 +1445,7 @@ getpeername1(struct thread *td, struct getpeername_arg if (len != 0) { #ifdef COMPAT_OLDSOCK - if (compat) + if (compat && SV_PROC_FLAG(td->td_proc, SV_AOUT)) ((struct osockaddr *)sa)->sa_family = sa->sa_family; #endif error = copyout(sa, uap->asa, (u_int)len); @@ -1516,7 +1526,8 @@ sockargs(struct mbuf **mp, char *buf, socklen_t buflen if (buflen > MLEN) { #ifdef COMPAT_OLDSOCK - if (type == MT_SONAME && buflen <= 112) + if (type == MT_SONAME && buflen <= 112 && + SV_CURPROC_FLAG(SV_AOUT)) buflen = MLEN; /* unix domain compat. hack */ else #endif @@ -1534,7 +1545,8 @@ sockargs(struct mbuf **mp, char *buf, socklen_t buflen sa = mtod(m, struct sockaddr *); #if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN - if (sa->sa_family == 0 && sa->sa_len < AF_MAX) + if (sa->sa_family == 0 && sa->sa_len < AF_MAX && + SV_CURPROC_FLAG(SV_AOUT)) sa->sa_family = sa->sa_len; #endif sa->sa_len = buflen; @@ -1559,7 +1571,8 @@ getsockaddr(struct sockaddr **namp, const struct socka free(sa, M_SONAME); } else { #if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN - if (sa->sa_family == 0 && sa->sa_len < AF_MAX) + if (sa->sa_family == 0 && sa->sa_len < AF_MAX && + SV_CURPROC_FLAG(SV_AOUT)) sa->sa_family = sa->sa_len; #endif sa->sa_len = len; From owner-svn-src-head@freebsd.org Sun Aug 11 19:17:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CCC4BFDD9; Sun, 11 Aug 2019 19:17:30 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4667yy0Mgcz4Gp3; Sun, 11 Aug 2019 19:17:30 +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 E23051ACFB; Sun, 11 Aug 2019 19:17:29 +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 x7BJHTrb013010; Sun, 11 Aug 2019 19:17:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BJHToK013008; Sun, 11 Aug 2019 19:17:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908111917.x7BJHToK013008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Aug 2019 19:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350863 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 350863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 19:17:30 -0000 Author: kib Date: Sun Aug 11 19:17:29 2019 New Revision: 350863 URL: https://svnweb.freebsd.org/changeset/base/350863 Log: compat/linux: Remove obsoleted and somewhat confusing comments related to COMPAT_43. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21200 Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_uid16.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Aug 11 19:16:07 2019 (r350862) +++ head/sys/compat/linux/linux_misc.c Sun Aug 11 19:17:29 2019 (r350863) @@ -1547,17 +1547,6 @@ linux_reboot(struct thread *td, struct linux_reboot_ar } -/* - * The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify - * td->td_retval[1] when COMPAT_43 is defined. This clobbers registers that - * are assumed to be preserved. The following lightweight syscalls fixes - * this. See also linux_getgid16() and linux_getuid16() in linux_uid16.c - * - * linux_getpid() - MP SAFE - * linux_getgid() - MP SAFE - * linux_getuid() - MP SAFE - */ - int linux_getpid(struct thread *td, struct linux_getpid_args *args) { Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Sun Aug 11 19:16:07 2019 (r350862) +++ head/sys/compat/linux/linux_uid16.c Sun Aug 11 19:17:29 2019 (r350863) @@ -281,16 +281,6 @@ linux_getgroups16(struct thread *td, struct linux_getg return (0); } -/* - * The FreeBSD native getgid(2) and getuid(2) also modify td->td_retval[1] - * when COMPAT_43 is defined. This clobbers registers that are assumed to - * be preserved. The following lightweight syscalls fixes this. See also - * linux_getpid(2), linux_getgid(2) and linux_getuid(2) in linux_misc.c - * - * linux_getgid16() - MP SAFE - * linux_getuid16() - MP SAFE - */ - int linux_getgid16(struct thread *td, struct linux_getgid16_args *args) { From owner-svn-src-head@freebsd.org Sun Aug 11 20:12:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2DFBC0BDD; Sun, 11 Aug 2019 20:12:19 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 4669BC3mQ0z4Jpc; Sun, 11 Aug 2019 20:12:19 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [IPv6:2601:641:300:6e9f:2813:442c:2dc2:7131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id D87072AB41; Sun, 11 Aug 2019 20:12:18 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.1b.0.190715 Date: Sun, 11 Aug 2019 13:12:12 -0700 Subject: Re: svn commit: r350843 - head From: Ravi Pokala To: Conrad Meyer , , , Message-ID: Thread-Topic: svn commit: r350843 - head References: <201908101822.x7AIMMZg018080@repo.freebsd.org> In-Reply-To: <201908101822.x7AIMMZg018080@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 20:12:19 -0000 Since you brought it up, why are the LINTs generated into the src tree anyw= ay? Shouldn't they go in the build tree? -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Conrad Meyer Date: 2019-08-10, Saturday at 11:22 To: , , Subject: svn commit: r350843 - head Author: cem Date: Sat Aug 10 18:22:22 2019 New Revision: 350843 URL: https://svnweb.freebsd.org/changeset/base/350843 =20 Log: .gitignore: Add LINT kernel configurations generated into SRCDIR =20 Modified: head/.gitignore =20 Modified: head/.gitignore =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/.gitignore Sat Aug 10 17:58:30 2019 (r350842) +++ head/.gitignore Sat Aug 10 18:22:22 2019 (r350843) @@ -17,3 +17,19 @@ GTAGS ID cscope.out ?cscope.out +# Ignore LINT generated configs. +/sys/amd64/conf/LINT +/sys/amd64/conf/LINT-NOINET +/sys/amd64/conf/LINT-NOINET6 +/sys/amd64/conf/LINT-NOIP +/sys/arm/conf/LINT +/sys/arm/conf/LINT-V5 +/sys/arm/conf/LINT-V7 +/sys/arm64/conf/LINT +/sys/i386/conf/LINT +/sys/i386/conf/LINT-NOINET +/sys/i386/conf/LINT-NOINET6 +/sys/i386/conf/LINT-NOIP +/sys/powerpc/conf/LINT +/sys/powerpc/conf/LINT64 +/sys/sparc64/conf/LINT =20 =20 From owner-svn-src-head@freebsd.org Sun Aug 11 21:19:34 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B17FC2DE7 for ; Sun, 11 Aug 2019 21:19:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 466Bgn2rKNz4P8D for ; Sun, 11 Aug 2019 21:19:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id g17so4965943qkk.8 for ; Sun, 11 Aug 2019 14:19:33 -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=kJHIa8/jBPwyDkESB0bwnOA0QYpwP4i58m9ItqQ0g88=; b=zB5hBGzVOU9XvZEpjd6ISh20nwri1piZOzJLjfaBU3pnqHBj11ep/A6OI6WeJjZfgF OjqYJfdcFKUQ+MZBDucZ7TfGtczw+98hAe7+gSXHudLk751KJF9CbaNvvJYjU31oJ1as 5SGJN6a3ew7kwcr2MHYK3ZZndywK7va5na/x4AKKlG22/WvVJkBxRFsCQ9O1d3YycuvK V2WP+E04MXG4fkVmEuDpJ6UcfyWp7mN3gr4YJKe+BJyhh/k1byRwdbWHlfBnRADtLrl0 Cl09tpVB4rRHpSAFAe/r5lb9F/7Wg+af3zYaaQigesrRrZrNqQ4Lyrklw2t+d7YPDVT3 tLiQ== 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=kJHIa8/jBPwyDkESB0bwnOA0QYpwP4i58m9ItqQ0g88=; b=TXqU0BUeauE51JO2JVPBBb4wdaViVbzpgK8gFcU5BPqGyG3wOFfdE1AY1k3FxXcAM+ 7eMYiyI9XLltPAANzJN/JDZ4DqgLoreu/qUbwu/zIgtHMwZNG6en6rOcUqVpLDmNGCZ9 ResJo0E3a+I6m2JyGZVpbz5nlT6Pww48bohxCatNq8Hua6oSKrDaIYSsfMuQzB3EhuFk m7d9DBI6WCbE1XxoHpCI6LoqI+bFxyCCYySqUJ/gV/ohfxBnJloUhDkrisVjgcL4K40k zgdCIfdjcas3uHBptc2fCMsgzicmUdCu00Bhg/zZEt+UCLU0jm1cNUQ78MFIJ2XkgiBy L78g== X-Gm-Message-State: APjAAAWFAf81S/+sAyhncUie+xqN1J5LvEDPPPlhhoTO2gmTYtZumLhs PzAK+k/jyrkyQBSHzr75x1gozxiHHjpnNqiDFvdd1w== X-Google-Smtp-Source: APXvYqx8jl4t65BuaFa0rbRutlA7HRjjELjplGhYA+MhPKJ7DexIOznSGGcScSP2gLhTJ2GLwc6/Xs0plsC8XN05ELs= X-Received: by 2002:ae9:f107:: with SMTP id k7mr28455712qkg.215.1565558371856; Sun, 11 Aug 2019 14:19:31 -0700 (PDT) MIME-Version: 1.0 References: <201908101822.x7AIMMZg018080@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 11 Aug 2019 15:19:19 -0600 Message-ID: Subject: Re: svn commit: r350843 - head To: Ravi Pokala Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 466Bgn2rKNz4P8D X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=zB5hBGzV; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.98 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; RCVD_IN_DNSWL_NONE(0.00)[b.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.98)[ip: (-9.50), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.39), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 21:19:34 -0000 Because config didn't know how to find the kernel sources if it was generated in the obj tree. I think that we could fix that now that config can cope... Warner On Sun, Aug 11, 2019, 2:12 PM Ravi Pokala wrote: > Since you brought it up, why are the LINTs generated into the src tree > anyway? Shouldn't they go in the build tree? > > -Ravi (rpokala@) > > =EF=BB=BF-----Original Message----- > From: on behalf of Conrad Meyer > > Date: 2019-08-10, Saturday at 11:22 > To: , , < > svn-src-head@freebsd.org> > Subject: svn commit: r350843 - head > > Author: cem > Date: Sat Aug 10 18:22:22 2019 > New Revision: 350843 > URL: https://svnweb.freebsd.org/changeset/base/350843 > > Log: > .gitignore: Add LINT kernel configurations generated into SRCDIR > > Modified: > head/.gitignore > > Modified: head/.gitignore > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/.gitignore Sat Aug 10 17:58:30 2019 (r350842) > +++ head/.gitignore Sat Aug 10 18:22:22 2019 (r350843) > @@ -17,3 +17,19 @@ GTAGS > ID > cscope.out > ?cscope.out > +# Ignore LINT generated configs. > +/sys/amd64/conf/LINT > +/sys/amd64/conf/LINT-NOINET > +/sys/amd64/conf/LINT-NOINET6 > +/sys/amd64/conf/LINT-NOIP > +/sys/arm/conf/LINT > +/sys/arm/conf/LINT-V5 > +/sys/arm/conf/LINT-V7 > +/sys/arm64/conf/LINT > +/sys/i386/conf/LINT > +/sys/i386/conf/LINT-NOINET > +/sys/i386/conf/LINT-NOINET6 > +/sys/i386/conf/LINT-NOIP > +/sys/powerpc/conf/LINT > +/sys/powerpc/conf/LINT64 > +/sys/sparc64/conf/LINT > > > > > > From owner-svn-src-head@freebsd.org Sun Aug 11 23:19:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49C71C845B; Sun, 11 Aug 2019 23:19:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466FLj1CPlz4YXW; Sun, 11 Aug 2019 23:19:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7AC91D96C; Sun, 11 Aug 2019 23:19:56 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7BNJuAU057553; Sun, 11 Aug 2019 23:19:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BNJuO0057552; Sun, 11 Aug 2019 23:19:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201908112319.x7BNJuO0057552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Aug 2019 23:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350879 - head/sys/arm/ti/am335x X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/ti/am335x X-SVN-Commit-Revision: 350879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 23:19:57 -0000 Author: ian Date: Sun Aug 11 23:19:56 2019 New Revision: 350879 URL: https://svnweb.freebsd.org/changeset/base/350879 Log: Revert r350841. I didn't realize that on this chip, reading the interrupt status register clears pending interrupts. By moving that code out of the interrupt handler into a taskqueue task, I effectively created an interrupt storm by returning from the handler with the interrupt source still active. We'll have to find a different solution for this driver's need to sleep in an ithread context. Modified: head/sys/arm/ti/am335x/am335x_pmic.c Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Sun Aug 11 23:01:31 2019 (r350878) +++ head/sys/arm/ti/am335x/am335x_pmic.c Sun Aug 11 23:19:56 2019 (r350879) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -62,7 +61,6 @@ struct am335x_pmic_softc { uint32_t sc_addr; struct resource *sc_irq_res; void *sc_intrhand; - struct task intr_task; }; static const char *tps65217_voreg_c[4] = {"4.10V", "4.15V", "4.20V", "4.25V"}; @@ -87,7 +85,7 @@ am335x_pmic_write(device_t dev, uint8_t address, uint8 } static void -am335x_pmic_intrtask(void *arg, int pending) +am335x_pmic_intr(void *arg) { struct am335x_pmic_softc *sc = (struct am335x_pmic_softc *)arg; struct tps65217_status_reg status_reg; @@ -95,16 +93,20 @@ am335x_pmic_intrtask(void *arg, int pending) int rv; char notify_buf[16]; + THREAD_SLEEPING_OK(); rv = am335x_pmic_read(sc->sc_dev, TPS65217_INT_REG, (uint8_t *)&int_reg, 1); if (rv != 0) { device_printf(sc->sc_dev, "Cannot read interrupt register\n"); + THREAD_NO_SLEEPING(); return; } rv = am335x_pmic_read(sc->sc_dev, TPS65217_STATUS_REG, (uint8_t *)&status_reg, 1); if (rv != 0) { device_printf(sc->sc_dev, "Cannot read status register\n"); + THREAD_NO_SLEEPING(); return; } + THREAD_NO_SLEEPING(); if (int_reg.pbi && status_reg.pb) shutdown_nice(RB_POWEROFF); @@ -115,18 +117,6 @@ am335x_pmic_intrtask(void *arg, int pending) } } -static void -am335x_pmic_intr(void *arg) -{ - struct am335x_pmic_softc *sc = arg; - - /* - * Handling the interrupt requires doing i2c IO, which sleeps while the - * IO is in progress, so do the processing on a taskqueue thread. - */ - taskqueue_enqueue(taskqueue_thread, &sc->intr_task); -} - static int am335x_pmic_probe(device_t dev) { @@ -284,8 +274,6 @@ am335x_pmic_attach(device_t dev) int rid; sc = device_get_softc(dev); - - TASK_INIT(&sc->intr_task, 0, am335x_pmic_intrtask, sc); rid = 0; sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, From owner-svn-src-head@freebsd.org Sun Aug 11 23:54:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1024EC903F; Sun, 11 Aug 2019 23:54:50 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466G6x6hJdz4bMh; Sun, 11 Aug 2019 23:54: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 C3C2E1E076; Sun, 11 Aug 2019 23:54:49 +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 x7BNsnJ2081108; Sun, 11 Aug 2019 23:54:49 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BNsnWv081107; Sun, 11 Aug 2019 23:54:49 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201908112354.x7BNsnWv081107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 11 Aug 2019 23:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350880 - 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: 350880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 23:54:50 -0000 Author: cy Date: Sun Aug 11 23:54:49 2019 New Revision: 350880 URL: https://svnweb.freebsd.org/changeset/base/350880 Log: r272552 applied the patch from ipfilter upstream fil.c r1.129 to fix broken ipfilter rule matches (upstream bug #554). The upstream patch was incomplete, it resolved all but one rule compare issue. The issue fixed here is when "{to, reply-to, dup-to} interface" are used in conjuncion with "on interface". The match was only made if the on keyword was specified in the same order in each case referencing the same rule. This commit fixes this. The reason for this is that interface name strings and comment keyword comments are stored in a a variable length field starting at fr_names in the frentry struct. These strings are placed into this variable length in the order they are encountered by ipf_y.y and indexed through index pointers in fr_ifnames, fr_comment or one of the frdest struct fd_name fields. (Three frdest structs are within frentry.) Order matters and this patch takes this into account. While in here it was discovered that though ipfilter is designed to support multiple interface specifiations per rule (up to four), this undocumented (the man page makes no mention of it) feature does not work. A todo is to fix the multiple interfaces feature at a later date. To understand the design decision as to why only four were intended, it is suspected that the decision was made because Sun workstations and PCs rarely if ever exceeded four NICs at the time, this is not true in 2019. PR: 238796 Reported by: WHR MFC after: 2 weeks Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_fil.h Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sun Aug 11 23:19:56 2019 (r350879) +++ head/sys/contrib/ipfilter/netinet/fil.c Sun Aug 11 23:54:49 2019 (r350880) @@ -4418,6 +4418,28 @@ ipf_matchicmpqueryreply(v, ic, icmp, rev) } +/* + * IFNAMES are located in the variable length field starting at + * frentry.fr_names. As pointers within the struct cannot be passed + * to the kernel from ipf(8), an offset is used. An offset of -1 means it + * is unused (invalid). If it is used (valid) it is an offset to the + * character string of an interface name or a comment. The following + * macros will assist those who follow to understand the code. + */ +#define IPF_IFNAME_VALID(_a) (_a != -1) +#define IPF_IFNAME_INVALID(_a) (_a == -1) +#define IPF_IFNAMES_DIFFERENT(_a) \ + !((IPF_IFNAME_INVALID(fr1->_a) && \ + IPF_IFNAME_INVALID(fr2->_a)) || \ + (IPF_IFNAME_VALID(fr1->_a) && \ + IPF_IFNAME_VALID(fr2->_a) && \ + !strcmp(FR_NAME(fr1, _a), FR_NAME(fr2, _a)))) +#define IPF_FRDEST_DIFFERENT(_a) \ + (memcmp(&fr1->_a.fd_addr, &fr2->_a.fd_addr, \ + offsetof(frdest_t, fd_name) - offsetof(frdest_t, fd_addr)) || \ + IPF_IFNAMES_DIFFERENT(_a.fd_name)) + + /* ------------------------------------------------------------------------ */ /* Function: ipf_rule_compare */ /* Parameters: fr1(I) - first rule structure to compare */ @@ -4430,22 +4452,50 @@ ipf_matchicmpqueryreply(v, ic, icmp, rev) static int ipf_rule_compare(frentry_t *fr1, frentry_t *fr2) { + int i; + if (fr1->fr_cksum != fr2->fr_cksum) return (1); if (fr1->fr_size != fr2->fr_size) return (2); if (fr1->fr_dsize != fr2->fr_dsize) return (3); - if (bcmp((char *)&fr1->fr_func, (char *)&fr2->fr_func, FR_CMPSIZ(fr1)) + if (bcmp((char *)&fr1->fr_func, (char *)&fr2->fr_func, FR_CMPSIZ) != 0) return (4); + /* + * XXX: There is still a bug here as different rules with the + * the same interfaces but in a different order will compare + * differently. But since multiple interfaces in a rule doesn't + * work anyway a simple straightforward compare is performed + * here. Ultimately frentry_t creation will need to be + * revisited in ipf_y.y. While the other issue, recognition + * of only the first interface in a list of interfaces will + * need to be separately addressed along with why only four. + */ + for (i = 0; i < FR_NUM(fr1->fr_ifnames); i++) { + /* + * XXX: It's either the same index or uninitialized. + * We assume this because multiple interfaces + * referenced by the same rule doesn't work anyway. + */ + if (IPF_IFNAMES_DIFFERENT(fr_ifnames[i])) + return(5); + } + + if (IPF_FRDEST_DIFFERENT(fr_tif)) + return (6); + if (IPF_FRDEST_DIFFERENT(fr_rif)) + return (7); + if (IPF_FRDEST_DIFFERENT(fr_dif)) + return (8); if (!fr1->fr_data && !fr2->fr_data) return (0); /* move along, nothing to see here */ if (fr1->fr_data && fr2->fr_data) { if (bcmp(fr1->fr_caddr, fr2->fr_caddr, fr1->fr_dsize) == 0) return (0); /* same */ } - return (5); + return (9); } Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Sun Aug 11 23:19:56 2019 (r350879) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Sun Aug 11 23:54:49 2019 (r350880) @@ -735,12 +735,9 @@ typedef struct frentry { u_char fr_icode; /* return ICMP code */ int fr_group; /* group to which this rule belongs */ int fr_grhead; /* group # which this rule starts */ - int fr_ifnames[4]; int fr_isctag; int fr_rpc; /* XID Filtering */ ipftag_t fr_nattag; - frdest_t fr_tifs[2]; /* "to"/"reply-to" interface */ - frdest_t fr_dif; /* duplicate packet interface */ /* * These are all options related to stateful filtering */ @@ -750,6 +747,12 @@ typedef struct frentry { int fr_icmphead; /* ICMP group for state options */ u_int fr_age[2]; /* non-TCP state timeouts */ /* + * These are compared separately. + */ + int fr_ifnames[4]; + frdest_t fr_tifs[2]; /* "to"/"reply-to" interface */ + frdest_t fr_dif; /* duplicate packet interface */ + /* * How big is the name buffer at the end? */ int fr_namelen; @@ -827,9 +830,10 @@ typedef struct frentry { #define FR_NOLOGTAG 0 -#define FR_CMPSIZ(_f) ((_f)->fr_size - \ - offsetof(struct frentry, fr_func)) +#define FR_CMPSIZ (offsetof(struct frentry, fr_ifnames) - \ + offsetof(struct frentry, fr_func)) #define FR_NAME(_f, _n) (_f)->fr_names + (_f)->_n +#define FR_NUM(_a) (sizeof(_a) / sizeof(*_a)) /* From owner-svn-src-head@freebsd.org Sun Aug 11 23:54:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99B17C905E; Sun, 11 Aug 2019 23:54:53 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466G713Pn1z4bNx; Sun, 11 Aug 2019 23:54:53 +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 3F0C11E078; Sun, 11 Aug 2019 23:54: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 x7BNsrBG081168; Sun, 11 Aug 2019 23:54:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BNsq5S081165; Sun, 11 Aug 2019 23:54:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201908112354.x7BNsq5S081165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 11 Aug 2019 23:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350881 - 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: 350881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 11 Aug 2019 23:54:53 -0000 Author: cy Date: Sun Aug 11 23:54:52 2019 New Revision: 350881 URL: https://svnweb.freebsd.org/changeset/base/350881 Log: Calculate the number interface array elements using the new FR_NUM macro instead of the hard-coded value of 4. This is a precursor to increasing the number of interfaces speficied in "on {interface, ..., interface}". Note that though this feature is coded in ipf_y.y, it is partially supported in the ipfilter kld, meaning it does not work yet (and is yet to be documented in ipf.5 too). MFC after: 2 weeks Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sun Aug 11 23:54:49 2019 (r350880) +++ head/sys/contrib/ipfilter/netinet/fil.c Sun Aug 11 23:54:52 2019 (r350881) @@ -4023,7 +4023,7 @@ ipf_synclist(softc, fr, ifp) /* * Lookup all the interface names that are part of the rule. */ - for (i = 0; i < 4; i++) { + for (i = 0; i < FR_NUM(fr->fr_ifas); i++) { if ((ifp != NULL) && (fr->fr_ifas[i] != ifp)) continue; if (fr->fr_ifnames[i] == -1) Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Sun Aug 11 23:54:49 2019 (r350880) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Sun Aug 11 23:54:52 2019 (r350881) @@ -975,7 +975,7 @@ ipf_state_putent(softc, softs, data) /* * Look up all the interface names in the rule. */ - for (i = 0; i < 4; i++) { + for (i = 0; i < FR_NUM(fr->fr_ifnames); i++) { if (fr->fr_ifnames[i] == -1) { fr->fr_ifas[i] = NULL; continue; @@ -985,7 +985,7 @@ ipf_state_putent(softc, softs, data) fr->fr_family); } - for (i = 0; i < 4; i++) { + for (i = 0; i < FR_NUM(isn->is_ifname); i++) { name = isn->is_ifname[i]; isn->is_ifp[i] = ipf_resolvenic(softc, name, isn->is_v); @@ -1076,7 +1076,7 @@ ipf_state_insert(softc, is, rev) /* * Look up all the interface names in the state entry. */ - for (i = 0; i < 4; i++) { + for (i = 0; i < FR_NUM(is->is_ifp); i++) { if (is->is_ifp[i] != NULL) continue; is->is_ifp[i] = ipf_resolvenic(softc, is->is_ifname[i], @@ -3574,7 +3574,7 @@ ipf_state_sync(softc, ifp) /* * Look up all the interface names in the state entry. */ - for (i = 0; i < 4; i++) { + for (i = 0; i < FR_NUM(is->is_ifp); i++) { if (ifp == NULL || ifp == is->is_ifp[i]) is->is_ifp[i] = ipf_resolvenic(softc, is->is_ifname[i], From owner-svn-src-head@freebsd.org Mon Aug 12 02:42:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7670ACBE74; Mon, 12 Aug 2019 02:42:48 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466Krm2VWDz3DqT; Mon, 12 Aug 2019 02:42:48 +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 376A81FEDB; Mon, 12 Aug 2019 02:42:48 +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 x7C2gmHI081123; Mon, 12 Aug 2019 02:42:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7C2gmpg081122; Mon, 12 Aug 2019 02:42:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201908120242.x7C2gmpg081122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 12 Aug 2019 02:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350882 - 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: 350882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 02:42:48 -0000 Author: cy Date: Mon Aug 12 02:42:47 2019 New Revision: 350882 URL: https://svnweb.freebsd.org/changeset/base/350882 Log: Initialize the frentry (the control block that defines a rule) checksum to zero. Matching checksums save time and effort by mitigating the need for full rule compare. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sun Aug 11 23:54:52 2019 (r350881) +++ head/sys/contrib/ipfilter/netinet/fil.c Mon Aug 12 02:42:47 2019 (r350882) @@ -4973,7 +4973,7 @@ frrequest(softc, unit, req, data, set, makecopy) * (this meaning no pointers are included). */ pp = (u_int *)(fp->fr_caddr + fp->fr_dsize); - for (p = (u_int *)fp->fr_data; p < pp; p++) + for (fp->fr_cksum = 0, p = (u_int *)fp->fr_data; p < pp; p++) fp->fr_cksum += *p; WRITE_ENTER(&softc->ipf_mutex); From owner-svn-src-head@freebsd.org Mon Aug 12 03:03:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC348CC2FD; Mon, 12 Aug 2019 03:03:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466LK94nClz3FcQ; Mon, 12 Aug 2019 03:03:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8595720280; Mon, 12 Aug 2019 03:03:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7C33vTo093665; Mon, 12 Aug 2019 03:03:57 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7C33ums093662; Mon, 12 Aug 2019 03:03:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201908120303.x7C33ums093662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 12 Aug 2019 03:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350883 - in head/sys/powerpc: booke include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: booke include X-SVN-Commit-Revision: 350883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 03:03:57 -0000 Author: jhibbits Date: Mon Aug 12 03:03:56 2019 New Revision: 350883 URL: https://svnweb.freebsd.org/changeset/base/350883 Log: powerpc: Unify pmap definitions between AIM and Book-E This is part 2 of r347078, pulling the page directory out of the Book-E pmap. This breaks KBI for anything that uses struct pmap (such as vm_map) so any modules that access this must be rebuilt. Modified: head/sys/powerpc/booke/pmap.c head/sys/powerpc/booke/trap_subr.S head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Mon Aug 12 02:42:47 2019 (r350882) +++ head/sys/powerpc/booke/pmap.c Mon Aug 12 03:03:56 2019 (r350883) @@ -184,6 +184,7 @@ unsigned int kernel_ptbls; /* Number of KVA ptbls. */ #ifdef __powerpc64__ unsigned int kernel_pdirs; #endif +static uma_zone_t ptbl_root_zone; /* * If user pmap is processed with mmu_booke_remove and the resident count @@ -262,12 +263,14 @@ static int pv_entry_count = 0, pv_entry_max = 0, pv_en #endif #ifdef __powerpc64__ +#define PMAP_ROOT_SIZE (sizeof(pte_t***) * PP2D_NENTRIES) static pte_t *ptbl_alloc(mmu_t, pmap_t, pte_t **, unsigned int, boolean_t); static void ptbl_free(mmu_t, pmap_t, pte_t **, unsigned int, vm_page_t); static void ptbl_hold(mmu_t, pmap_t, pte_t **, unsigned int); static int ptbl_unhold(mmu_t, pmap_t, vm_offset_t); #else +#define PMAP_ROOT_SIZE (sizeof(pte_t**) * PDIR_NENTRIES) static void ptbl_init(void); static struct ptbl_buf *ptbl_buf_alloc(void); static void ptbl_buf_free(struct ptbl_buf *); @@ -600,9 +603,6 @@ pdir_alloc(mmu_t mmu, pmap_t pmap, unsigned int pp2d_i pte_t **pdir; int req; - KASSERT((pdir[pp2d_idx] == NULL), - ("%s: valid pdir entry exists!", __func__)); - req = VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; while ((m = vm_page_alloc(NULL, pp2d_idx, req)) == NULL) { PMAP_UNLOCK(pmap); @@ -632,6 +632,7 @@ pdir_free(mmu_t mmu, pmap_t pmap, unsigned int pp2d_id pmap->pm_pp2d[pp2d_idx] = NULL; + vm_wire_sub(1); vm_page_free_zero(m); } @@ -660,7 +661,8 @@ pdir_unhold(mmu_t mmu, pmap_t pmap, u_int pp2d_idx) /* * Free pdir page if there are no dir entries in this pdir. */ - if (vm_page_unwire_noq(m)) { + m->wire_count--; + if (m->wire_count == 0) { pdir_free(mmu, pmap, pp2d_idx, m); return (1); } @@ -682,7 +684,7 @@ pdir_hold(mmu_t mmu, pmap_t pmap, pte_t ** pdir) KASSERT((pdir != NULL), ("pdir_hold: null pdir")); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pdir)); - vm_page_wire(m); + m->wire_count++; } /* Allocate page table. */ @@ -728,6 +730,7 @@ ptbl_free(mmu_t mmu, pmap_t pmap, pte_t ** pdir, unsig pdir[pdir_idx] = NULL; + vm_wire_sub(1); vm_page_free_zero(m); } @@ -763,7 +766,8 @@ ptbl_unhold(mmu_t mmu, pmap_t pmap, vm_offset_t va) * wire_count has the same value for all ptbl pages, so check the * last page. */ - if (vm_page_unwire_noq(m)) { + m->wire_count--; + if (m->wire_count == 0) { ptbl_free(mmu, pmap, pdir, pdir_idx, m); pdir_unhold(mmu, pmap, pp2d_idx); return (1); @@ -789,7 +793,7 @@ ptbl_hold(mmu_t mmu, pmap_t pmap, pte_t ** pdir, unsig KASSERT((ptbl != NULL), ("ptbl_hold: null ptbl")); m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t) ptbl)); - vm_page_wire(m); + m->wire_count++; } #else @@ -1545,6 +1549,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o vm_offset_t kernel_pdir, kstack0; vm_paddr_t kstack0_phys; void *dpcpu; + vm_offset_t kernel_ptbl_root; debugf("mmu_booke_bootstrap: entered\n"); @@ -1585,7 +1590,10 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o data_end = round_page(data_end); -#ifndef __powerpc64__ +#ifdef __powerpc64__ + kernel_ptbl_root = data_end; + data_end += PP2D_NENTRIES * sizeof(pte_t**); +#else /* Allocate space for ptbl_bufs. */ ptbl_bufs = (struct ptbl_buf *)data_end; data_end += sizeof(struct ptbl_buf) * PTBL_BUFS; @@ -1593,6 +1601,8 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o (uintptr_t)ptbl_bufs, data_end); data_end = round_page(data_end); + kernel_ptbl_root = data_end; + data_end += PDIR_NENTRIES * sizeof(pte_t*); #endif /* Allocate PTE tables for kernel KVA. */ @@ -1814,6 +1824,11 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o #ifndef __powerpc64__ kptbl_min = VM_MIN_KERNEL_ADDRESS / PDIR_SIZE; #endif +#ifdef __powerpc64__ + kernel_pmap->pm_pp2d = (pte_t ***)kernel_ptbl_root; +#else + kernel_pmap->pm_pdir = (pte_t **)kernel_ptbl_root; +#endif debugf("kernel_pmap = 0x%"PRI0ptrX"\n", (uintptr_t)kernel_pmap); kernel_pte_alloc(virtual_avail, kernstart, kernel_pdir); @@ -1989,6 +2004,10 @@ mmu_booke_init(mmu_t mmu) /* Pre-fill pvzone with initial number of pv entries. */ uma_prealloc(pvzone, PV_ENTRY_ZONE_MIN); + /* Create a UMA zone for page table roots. */ + ptbl_root_zone = uma_zcreate("pmap root", PMAP_ROOT_SIZE, + NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, UMA_ZONE_VM); + /* Initialize ptbl allocation. */ ptbl_init(); } @@ -2182,12 +2201,13 @@ mmu_booke_pinit(mmu_t mmu, pmap_t pmap) CPU_ZERO(&kernel_pmap->pm_active); bzero(&pmap->pm_stats, sizeof(pmap->pm_stats)); #ifdef __powerpc64__ - bzero(&pmap->pm_pp2d, sizeof(pte_t **) * PP2D_NENTRIES); - TAILQ_INIT(&pmap->pm_pdir_list); + pmap->pm_pp2d = uma_zalloc(ptbl_root_zone, M_WAITOK); + bzero(pmap->pm_pp2d, sizeof(pte_t **) * PP2D_NENTRIES); #else - bzero(&pmap->pm_pdir, sizeof(pte_t *) * PDIR_NENTRIES); -#endif + pmap->pm_pdir = uma_zalloc(ptbl_root_zone, M_WAITOK); + bzero(pmap->pm_pdir, sizeof(pte_t *) * PDIR_NENTRIES); TAILQ_INIT(&pmap->pm_ptbl_list); +#endif } /* @@ -2202,6 +2222,11 @@ mmu_booke_release(mmu_t mmu, pmap_t pmap) KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); +#ifdef __powerpc64__ + uma_zfree(ptbl_root_zone, pmap->pm_pp2d); +#else + uma_zfree(ptbl_root_zone, pmap->pm_pdir); +#endif } /* @@ -2776,7 +2801,7 @@ retry: if (vm_page_pa_tryrelock(pmap, PTE_PA(pte), &pa)) goto retry; m = PHYS_TO_VM_PAGE(PTE_PA(pte)); - vm_page_wire(m); + m->wire_count++; } } Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Mon Aug 12 02:42:47 2019 (r350882) +++ head/sys/powerpc/booke/trap_subr.S Mon Aug 12 03:03:56 2019 (r350883) @@ -796,22 +796,18 @@ pte_lookup: rldicl %r25, %r31, (64 - PP2D_H_L), (64 - PP2D_H_NUM) rldimi %r21, %r25, PP2D_L_NUM, (64 - (PP2D_L_NUM + PP2D_H_NUM)) slwi %r21, %r21, PP2D_ENTRY_SHIFT /* multiply by pp2d entry size */ - addi %r25, %r26, PM_PP2D /* pmap pm_pp2d[] address */ - add %r25, %r25, %r21 /* offset within pm_pp2d[] table */ - ld %r25, 0(%r25) /* get pdir address, i.e. pmap->pm_pp2d[pp2d_idx] * */ + ld %r25, PM_PP2D(%r26) /* pmap pm_pp2d[] address */ + ldx %r25, %r25, %r21 /* get pdir address, i.e. pmap->pm_pp2d[pp2d_idx] * */ cmpdi %r25, 0 - beq 1f + beq 2f -#if PAGE_SIZE < 65536 - rldicl %r21, %r31, (64 - PDIR_L), (64 - PDIR_NUM) /* pdir offset */ - slwi %r21, %r21, PDIR_ENTRY_SHIFT /* multiply by pdir entry size */ - add %r25, %r25, %r21 /* offset within pdir table */ - ld %r25, 0(%r25) /* get ptbl address, i.e. pmap->pm_pp2d[pp2d_idx][pdir_idx] */ + rldicl %r21, %r31, (64 - PDIR_L), (64 - PDIR_NUM) /* pdir offset */ + slwi %r21, %r21, PDIR_ENTRY_SHIFT /* multiply by pdir entry size */ + ldx %r25, %r25, %r21 /* get ptbl address, i.e. pmap->pm_pp2d[pp2d_idx][pdir_idx] */ cmpdi %r25, 0 - beq 1f -#endif + beq 2f rldicl %r21, %r31, (64 - PTBL_L), (64 - PTBL_NUM) /* ptbl offset */ slwi %r21, %r21, PTBL_ENTRY_SHIFT /* multiply by pte entry size */ @@ -820,14 +816,13 @@ pte_lookup: srwi %r21, %r31, PDIR_SHIFT /* pdir offset */ slwi %r21, %r21, PDIR_ENTRY_SHIFT /* multiply by pdir entry size */ - addi %r25, %r26, PM_PDIR /* pmap pm_dir[] address */ - add %r25, %r25, %r21 /* offset within pm_pdir[] table */ + lwz %r25, PM_PDIR(%r26) /* pmap pm_dir[] address */ /* * Get ptbl address, i.e. pmap->pm_pdir[pdir_idx] * This load may cause a Data TLB miss for non-kernel pmap! */ - LOAD %r25, 0(%r25) - CMPI %r25, 0 + lwzx %r25, %r25, %r21 /* offset within pm_pdir[] table */ + cmpwi %r25, 0 beq 2f lis %r21, PTBL_MASK@h Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Mon Aug 12 02:42:47 2019 (r350882) +++ head/sys/powerpc/include/pmap.h Mon Aug 12 03:03:56 2019 (r350883) @@ -140,7 +140,6 @@ struct pmap { struct mtx pm_mtx; cpuset_t pm_active; union { -#ifdef AIM struct { #ifdef __powerpc64__ @@ -154,8 +153,6 @@ struct pmap { struct pmap *pmap_phys; struct pvo_tree pmap_pvo; }; -#endif -#ifdef BOOKE struct { /* TID to identify this pmap entries in TLB */ tlbtid_t pm_tid[MAXCPU]; @@ -165,22 +162,18 @@ struct pmap { * Page table directory, * array of pointers to page directories. */ - pte_t **pm_pp2d[PP2D_NENTRIES]; - - /* List of allocated pdir bufs (pdir kva regions). */ - TAILQ_HEAD(, ptbl_buf) pm_pdir_list; + pte_t ***pm_pp2d; #else /* * Page table directory, * array of pointers to page tables. */ - pte_t *pm_pdir[PDIR_NENTRIES]; -#endif + pte_t **pm_pdir; /* List of allocated ptbl bufs (ptbl kva regions). */ TAILQ_HEAD(, ptbl_buf) pm_ptbl_list; - }; #endif + }; }; }; From owner-svn-src-head@freebsd.org Mon Aug 12 08:01:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4260A98A5; Mon, 12 Aug 2019 08:01:21 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466SwK5k4Fz3y5W; Mon, 12 Aug 2019 08:01:21 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7135236FB; Mon, 12 Aug 2019 08:01:21 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7C81LPN065492; Mon, 12 Aug 2019 08:01:21 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7C81LZW065491; Mon, 12 Aug 2019 08:01:21 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201908120801.x7C81LZW065491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 12 Aug 2019 08:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350885 - head/sys/dev/rtwn/pci X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/rtwn/pci X-SVN-Commit-Revision: 350885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 08:01:22 -0000 Author: avos Date: Mon Aug 12 08:01:21 2019 New Revision: 350885 URL: https://svnweb.freebsd.org/changeset/base/350885 Log: rtwn_pci: add device ID for RTL8192CE. PR: 239795 Submitted by: James Parsons MFC after: 1 week Relnotes: yes Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.h Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.h ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_attach.h Mon Aug 12 05:25:40 2019 (r350884) +++ head/sys/dev/rtwn/pci/rtwn_pci_attach.h Mon Aug 12 08:01:21 2019 (r350885) @@ -35,6 +35,7 @@ struct rtwn_pci_ident { static const struct rtwn_pci_ident rtwn_pci_ident_table[] = { { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE }, { 0x10ec, 0x8179, "Realtek RTL8188EE", RTWN_CHIP_RTL8188EE }, + { 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE }, { 0, 0, NULL, RTWN_CHIP_MAX_PCI } }; From owner-svn-src-head@freebsd.org Mon Aug 12 10:00:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54D98AC7BB; Mon, 12 Aug 2019 10:00:33 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466WYs1cTJz45WQ; Mon, 12 Aug 2019 10:00:33 +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 1AACC24D50; Mon, 12 Aug 2019 10:00:33 +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 x7CA0Wkb036073; Mon, 12 Aug 2019 10:00:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CA0WSI036072; Mon, 12 Aug 2019 10:00:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908121000.x7CA0WSI036072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 12 Aug 2019 10:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350893 - head/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/zfs X-SVN-Commit-Revision: 350893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 10:00:33 -0000 Author: avg Date: Mon Aug 12 10:00:32 2019 New Revision: 350893 URL: https://svnweb.freebsd.org/changeset/base/350893 Log: Allow ZVOL bookmarks to be listed recursively Many thanks to cryx-freebsd@h3q.com for reporting the problem and submitting a fix. I have chosen to take an equivalent but textually different patch from ZoL just to avoid increasing divergence between OpenZFS flavours. ZoL commit: zfsonlinux/zfse33da554c5daf0103b093f44ab5b90ad6c064c3f Author: loli10K Date: Wed Sep 7 19:34:20 2016 +0200 PR: 197821 Submitted by: cryx-freebsd@h3q.com (alternative version) Reported by: cryx-freebsd@h3q.com Obtained from: ZoL MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Mon Aug 12 09:20:02 2019 (r350892) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Mon Aug 12 10:00:32 2019 (r350893) @@ -445,13 +445,13 @@ zfs_for_each(int argc, char **argv, int flags, zfs_typ /* * If we're recursive, then we always allow filesystems as - * arguments. If we also are interested in snapshots, then we - * can take volumes as well. + * arguments. If we also are interested in snapshots or + * bookmarks, then we can take volumes as well. */ argtype = types; if (flags & ZFS_ITER_RECURSE) { argtype |= ZFS_TYPE_FILESYSTEM; - if (types & ZFS_TYPE_SNAPSHOT) + if (types & (ZFS_TYPE_SNAPSHOT | ZFS_TYPE_BOOKMARK)) argtype |= ZFS_TYPE_VOLUME; } From owner-svn-src-head@freebsd.org Mon Aug 12 10:30:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 875A5AD63C; Mon, 12 Aug 2019 10:30:01 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466XCs33BCz47Nx; Mon, 12 Aug 2019 10:30:01 +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 4B918252C9; Mon, 12 Aug 2019 10:30:01 +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 x7CAU1oC053609; Mon, 12 Aug 2019 10:30:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CAU11q053608; Mon, 12 Aug 2019 10:30:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908121030.x7CAU11q053608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 12 Aug 2019 10:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350894 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 350894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 10:30:01 -0000 Author: avg Date: Mon Aug 12 10:30:00 2019 New Revision: 350894 URL: https://svnweb.freebsd.org/changeset/base/350894 Log: a stop gap fix for a race between dnode_hold and dnode_sync_free The race was introduced in r337669, the large dnode feature import from ZoL. The problem was debugged by ZoL developers and then, independently, on FreeBSD. The fix is an early proposal by Brian Behlendorf: https://github.com/behlendorf/zfs/commit/50f32ed74e42aa28522e9681fb8ae55239fa33a7 This fix never went into ZoL. A larger change that was committed later included a different solution because of the re-worked code. Ideally, we want to revert this fix and re-synchronize FreeBSD large dnode code with that in illumos (or newer ZoL). illumos has a later import of the feature from ZoL that does not have the bug. PR: 236480 Obtained from: Brian Behlendorf Submitted by: ncrogers@gmail.com (patch adaptation) Reported by: ncrogers@gmail.com Tested by: ncrogers@gmail.com, Dennis Noordsij , Julien Cigar MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 12 10:00:32 2019 (r350893) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 12 10:30:00 2019 (r350894) @@ -1324,7 +1324,9 @@ dnode_hold_impl(objset_t *os, uint64_t object, int fla mutex_enter(&dn->dn_mtx); type = dn->dn_type; if (dn->dn_free_txg || - ((flag & DNODE_MUST_BE_FREE) && !refcount_is_zero(&dn->dn_holds))) { + ((flag & DNODE_MUST_BE_ALLOCATED) && type == DMU_OT_NONE) || + ((flag & DNODE_MUST_BE_FREE) && + (type != DMU_OT_NONE || !refcount_is_zero(&dn->dn_holds)))) { mutex_exit(&dn->dn_mtx); zrl_remove(&dnh->dnh_zrlock); dbuf_rele(db, FTAG); From owner-svn-src-head@freebsd.org Mon Aug 12 10:57:56 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F15E2AEA5B; Mon, 12 Aug 2019 10:57:56 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466Xr466vnz4BLl; Mon, 12 Aug 2019 10:57:56 +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 B30622584A; Mon, 12 Aug 2019 10:57:56 +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 x7CAvu9I075414; Mon, 12 Aug 2019 10:57:56 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CAvuTx075413; Mon, 12 Aug 2019 10:57:56 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201908121057.x7CAvuTx075413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 12 Aug 2019 10:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350895 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 350895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 10:57:57 -0000 Author: 0mp (ports committer) Date: Mon Aug 12 10:57:56 2019 New Revision: 350895 URL: https://svnweb.freebsd.org/changeset/base/350895 Log: install.1: Add missing arguments to option descriptions While here: - Remove deprecated Tn macros. - Do not use macros with the -width option. Reviewed by: bcr Approved by: doc (bcr) Differential Revision: https://reviews.freebsd.org/D21173 Modified: head/usr.bin/xinstall/install.1 Modified: head/usr.bin/xinstall/install.1 ============================================================================== --- head/usr.bin/xinstall/install.1 Mon Aug 12 10:30:00 2019 (r350894) +++ head/usr.bin/xinstall/install.1 Mon Aug 12 10:57:56 2019 (r350895) @@ -28,7 +28,7 @@ .\" From: @(#)install.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 18, 2013 +.Dd August 12, 2019 .Dt INSTALL 1 .Os .Sh NAME @@ -138,11 +138,11 @@ This option does not affect where the actual files are .It Fl d Create directories. Missing parent directories are created as required. -.It Fl f +.It Fl f Ar flags Specify the target's file flags; see .Xr chflags 1 for a list of possible flags and their meanings. -.It Fl g +.It Fl g Ar group Specify a group. A numeric GID is allowed. .It Fl h Ar hash @@ -165,13 +165,9 @@ The RMD-160 cryptographic message digest. .It Sy sha1 The SHA-1 cryptographic message digest. .It Sy sha256 -The 256-bits -.Tn SHA-2 -cryptographic message digest of the file. +The 256-bits SHA-2 cryptographic message digest of the file. .It Sy sha512 -The 512-bits -.Tn SHA-2 -cryptographic message digest of the file. +The 512-bits SHA-2 cryptographic message digest of the file. .El .It Fl l Ar linkflags Instead of copying the file make a link to the source. @@ -203,13 +199,13 @@ in an specification line. The metadata includes: the file name and file type, and depending upon other options, the owner, group, file flags, modification time, and tags. -.It Fl m +.It Fl m Ar mode Specify an alternate mode. The default mode is set to rwxr-xr-x (0755). The specified mode may be either an octal or symbolic value; see .Xr chmod 1 for a description of possible mode values. -.It Fl N +.It Fl N Ar dbdir Use the user database text file .Pa master.passwd and group database text file @@ -221,7 +217,7 @@ rather than using the results from the system's and .Xr getgrnam 3 (and related) library calls. -.It Fl o +.It Fl o Ar owner Specify an owner. A numeric UID is allowed. .It Fl p @@ -305,7 +301,7 @@ This is mainly for use in debugging the .Fx Ports Collection. .Sh FILES -.Bl -tag -width ".Pa INS@XXXX" -compact +.Bl -tag -width "INS@XXXX" -compact .It Pa INS@XXXX If either .Fl S From owner-svn-src-head@freebsd.org Mon Aug 12 11:42:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAD10B0517; Mon, 12 Aug 2019 11:42:16 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466YqD5QQqz4FTf; Mon, 12 Aug 2019 11:42:16 +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 B4C2C26136; Mon, 12 Aug 2019 11:42:16 +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 x7CBgGGC004623; Mon, 12 Aug 2019 11:42:16 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CBgGAd004621; Mon, 12 Aug 2019 11:42:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908121142.x7CBgGAd004621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 12 Aug 2019 11:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350897 - in head: cddl/contrib/opensolaris/cmd/zpool sys/cddl/contrib/opensolaris/common/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/cmd/zpool sys/cddl/contrib/opensolaris/common/zfs X-SVN-Commit-Revision: 350897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 11:42:16 -0000 Author: avg Date: Mon Aug 12 11:42:16 2019 New Revision: 350897 URL: https://svnweb.freebsd.org/changeset/base/350897 Log: MFV r350896: 6585 sha512, skein, and edonr have an unenforced dependency on extensible dataset illumos/illumos-gate@892586e8a147c02d7f4053cc405229a13e796928 https://github.com/illumos/illumos-gate/commit/892586e8a147c02d7f4053cc405229a13e796928 https://www.illumos.org/issues/6585 In any pool without the extensible dataset feature flag already enabled, creating a dataset with dedup set to use one of the new checksums would result in the following panic as soon as any data was added: panic[cpu0]/thread=ffffff0006761c40: feature_get_refcount(spa, feature, &refcount) != 48 (0x30 != 0x30), file: ../../common/fs/zfs/zfeature.c line 390 ffffff0006761830 fffffffffba8fbdd () ffffff0006761890 zfs:feature_do_action+11a () ffffff00067618c0 zfs:spa_feature_incr+1e () ffffff0006761920 zfs:dmu_object_zapify+b7 () ffffff00067619b0 zfs:dsl_dataset_activate_feature+97 () ffffff0006761a20 zfs:dsl_dataset_sync+ba () ffffff0006761ab0 zfs:dsl_pool_sync+153 () ffffff0006761b70 zfs:spa_sync+26e () ffffff0006761c20 zfs:txg_sync_thread+227 () ffffff0006761c30 unix:thread_start+8 () Inspection showed that feature->fi_feature was 7, which is the value of SPA_FEATURE_EXTENSIBLE_DATASET in the spa_feature enum. Testing shows that the panic can be prevented by explicitly setting extensible dataset as a dependency for the sha512, edonr, and skein feature flags. Alternatively, the new checksums code could possibly be changed to obviate the need for the dependency. Reviewed by: Matthew Ahrens Reviewed by: Richard Laager Approved by: Robert Mustacchi Author: ilovezfs Note that FreeBSD does not support ednor yet. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Mon Aug 12 11:27:17 2019 (r350896) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Mon Aug 12 11:42:16 2019 (r350897) @@ -531,7 +531,7 @@ boot loader. .Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:sha512" .It GUID Ta org.illumos:sha512 .It READ\-ONLY COMPATIBLE Ta no -.It DEPENDENCIES Ta none +.It DEPENDENCIES Ta extensible_dataset .El .Pp The @@ -570,7 +570,7 @@ are destroyed. .Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:skein" .It GUID Ta org.illumos:skein .It READ\-ONLY COMPATIBLE Ta no -.It DEPENDENCIES Ta none +.It DEPENDENCIES Ta extensible_dataset .El .Pp The Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Mon Aug 12 11:27:17 2019 (r350896) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Mon Aug 12 11:42:16 2019 (r350897) @@ -255,20 +255,33 @@ zpool_feature_init(void) ZFEATURE_FLAG_PER_DATASET, large_dnode_deps); } + static const spa_feature_t sha512_deps[] = { + SPA_FEATURE_EXTENSIBLE_DATASET, + SPA_FEATURE_NONE + }; zfeature_register(SPA_FEATURE_SHA512, "org.illumos:sha512", "sha512", "SHA-512/256 hash algorithm.", - ZFEATURE_FLAG_PER_DATASET, NULL); + ZFEATURE_FLAG_PER_DATASET, sha512_deps); + + static const spa_feature_t skein_deps[] = { + SPA_FEATURE_EXTENSIBLE_DATASET, + SPA_FEATURE_NONE + }; zfeature_register(SPA_FEATURE_SKEIN, "org.illumos:skein", "skein", "Skein hash algorithm.", - ZFEATURE_FLAG_PER_DATASET, NULL); + ZFEATURE_FLAG_PER_DATASET, skein_deps); #ifdef illumos + static const spa_feature_t edonr_deps[] = { + SPA_FEATURE_EXTENSIBLE_DATASET, + SPA_FEATURE_NONE + }; zfeature_register(SPA_FEATURE_EDONR, "org.illumos:edonr", "edonr", "Edon-R hash algorithm.", - ZFEATURE_FLAG_PER_DATASET, NULL); + ZFEATURE_FLAG_PER_DATASET, edonr_deps); #endif zfeature_register(SPA_FEATURE_DEVICE_REMOVAL, From owner-svn-src-head@freebsd.org Mon Aug 12 12:51:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC192B2E71; Mon, 12 Aug 2019 12:51:47 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466bMR61hTz4K7w; Mon, 12 Aug 2019 12:51:47 +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 B0BB526D67; Mon, 12 Aug 2019 12:51:47 +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 x7CCplZR044860; Mon, 12 Aug 2019 12:51:47 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CCpltl044859; Mon, 12 Aug 2019 12:51:47 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201908121251.x7CCpltl044859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 12 Aug 2019 12:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350899 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 350899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 12:51:48 -0000 Author: luporl Date: Mon Aug 12 12:51:47 2019 New Revision: 350899 URL: https://svnweb.freebsd.org/changeset/base/350899 Log: [PPC64] Save FPU registers before enabling VSX Fixed trap handler logic, in order to make it save FPU registers, if FPU is enabled, before enabling VSX. Without this change, FPU register contents were being lost when set before VSX was enabled. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Mon Aug 12 12:05:40 2019 (r350898) +++ head/sys/powerpc/powerpc/trap.c Mon Aug 12 12:51:47 2019 (r350899) @@ -295,7 +295,7 @@ trap(struct trapframe *frame) ("VSX already enabled for thread")); if (!(td->td_pcb->pcb_flags & PCB_VEC)) enable_vec(td); - if (!(td->td_pcb->pcb_flags & PCB_FPU)) + if (td->td_pcb->pcb_flags & PCB_FPU) save_fpu(td); td->td_pcb->pcb_flags |= PCB_VSX; enable_fpu(td); From owner-svn-src-head@freebsd.org Mon Aug 12 15:05:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7730B6117; Mon, 12 Aug 2019 15:05:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 466fKQ3HP3z4SLn; Mon, 12 Aug 2019 15:05:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x62b.google.com with SMTP id i2so48018171plt.1; Mon, 12 Aug 2019 08:05:14 -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=yGVlsZ250yampZFw1k8AWmoLbvg8n4yd/Swbyu2uH7c=; b=Lq7Xwfc5IX3dThK6xcx3YINin6drMbrm79MwJdiFJX0yKEsxJzTA55hh1+an+DvLEm gayFkEzXen8UP6X+/73aFQG0ovajEiIf9NwdlC8juJgwJ3h0CyvDCpYX+DODvLDBYmAU S1wbX4OpngHz3D0KI7RwGG7adISXZUQ/AHkkwQ2LN4NFyM9HlZD/kislXGXIECxW79CL ucjD2d6KKqQjIuMzoX+Izmmdso1MHWov6sYMM9D+VY7ECTPBfRzmHEWyJvLht6C9KO+o vJTLmZXxRgE5pLNcZK5UXH3rW74ZnE9ve4ImcmX66NvKFG2cMmCnebKinnucdCKd64kY cqFg== 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=yGVlsZ250yampZFw1k8AWmoLbvg8n4yd/Swbyu2uH7c=; b=Z9DBN38YLaqWc38Wef9Fx9vHIgzlceMXzr8v592A1xVxzws+Z6AarHB4ctznJLkpuD 7hIvfPYlVugA0sWHxUroOBYeqSBEDQSJtWMBeJ/XLCkgvv+3Molsk8azS+gdQyYKr5qh 9uLAg+/AVo1RA3llrUW4UHQASd8MXSG9sB3I3WFKEF9YvhVBBrnf8drU8akeLSq164UO dGJeh8P9TkSzCqCz7lR9se09V+5QNL1fbBbHMmGZnB9did5IDxvzwwCVU2fQVFFmAkkr 6/zO1qo2bqahveqlBNpJcaFaQ6lBoeJD9et5x96DS8VDwulMVmypkjiprZoPOPK5ieFf zD5w== X-Gm-Message-State: APjAAAVo5hS8tN8E7nxkMcxl5d0YrX+7rw6yoTB4N+wEpx9YhW9NC9il bOhAOs+0GTknnS45EUVIWnlcSQsXu70= X-Google-Smtp-Source: APXvYqwJysXd8pPUhIYiRLaaOgCoz6qWelN1djvIhMysoHjnc6HsKbOAT3uwQYzDGJuraHZ6RWa/1A== X-Received: by 2002:a17:902:788b:: with SMTP id q11mr3777136pll.308.1565622312436; Mon, 12 Aug 2019 08:05:12 -0700 (PDT) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e13sm129473044pff.45.2019.08.12.08.05.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Aug 2019 08:05:10 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r350843 - head From: Enji Cooper In-Reply-To: <201908101822.x7AIMMZg018080@repo.freebsd.org> Date: Mon, 12 Aug 2019 08:05:09 -0700 Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <852FB97F-E419-4BA9-B0E3-607ABD4BEAE0@gmail.com> References: <201908101822.x7AIMMZg018080@repo.freebsd.org> To: Conrad Meyer X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 466fKQ3HP3z4SLn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Lq7Xwfc5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::62b as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-3.49 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; 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.99)[-0.986,0]; RECEIVED_SPAMHAUS_PBL(0.00)[228.52.19.73.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; 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.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-9.35), ipnet: 2607:f8b0::/32(-2.97), asn: 15169(-2.39), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[b.2.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 15:05:15 -0000 > On Aug 10, 2019, at 11:22 AM, Conrad Meyer wrote: >=20 > Author: cem > Date: Sat Aug 10 18:22:22 2019 > New Revision: 350843 > URL: https://svnweb.freebsd.org/changeset/base/350843 >=20 > Log: > .gitignore: Add LINT kernel configurations generated into SRCDIR Thank you for doing this Conrad :). This was a minor annoyance I ran = into before that I had forgotten about. Cheers, -Enji= From owner-svn-src-head@freebsd.org Mon Aug 12 17:18:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C7ADB97F7; Mon, 12 Aug 2019 17:18:21 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466jH135lHz4bRk; Mon, 12 Aug 2019 17:18:21 +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 4C2781D76; Mon, 12 Aug 2019 17:18:21 +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 x7CHIL9n003641; Mon, 12 Aug 2019 17:18:21 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CHILGN003640; Mon, 12 Aug 2019 17:18:21 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201908121718.x7CHILGN003640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 12 Aug 2019 17:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350902 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 350902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 17:18:21 -0000 Author: luporl Date: Mon Aug 12 17:18:20 2019 New Revision: 350902 URL: https://svnweb.freebsd.org/changeset/base/350902 Log: [ppc] avoid empty mdproc struct Avoid empty structs, that have undefined behavior in C99 and make compilers complain about it (empty struct has size 0 in C, size 1 in C++). Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21231 Modified: head/sys/powerpc/include/proc.h Modified: head/sys/powerpc/include/proc.h ============================================================================== --- head/sys/powerpc/include/proc.h Mon Aug 12 15:54:30 2019 (r350901) +++ head/sys/powerpc/include/proc.h Mon Aug 12 17:18:20 2019 (r350902) @@ -46,6 +46,11 @@ struct mdthread { }; struct mdproc { + /* Avoid empty structs, that have undefined behavior in C99 and + * make compilers complain about it + * (empty struct has size 0 in C, size 1 in C++). + */ + long md_spare; }; #ifdef __powerpc64__ From owner-svn-src-head@freebsd.org Mon Aug 12 19:44:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D49EABF59E; Mon, 12 Aug 2019 19:44:57 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466mX94NKDz3PFL; Mon, 12 Aug 2019 19:44:57 +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 78F473B9A; Mon, 12 Aug 2019 19:44:57 +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 x7CJivKr096579; Mon, 12 Aug 2019 19:44:57 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CJivDu096578; Mon, 12 Aug 2019 19:44:57 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201908121944.x7CJivDu096578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 12 Aug 2019 19:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350953 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 350953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 19:44:57 -0000 Author: luporl Date: Mon Aug 12 19:44:57 2019 New Revision: 350953 URL: https://svnweb.freebsd.org/changeset/base/350953 Log: Fix style and clarify comment Fix code style in proc.h and clarify comment about empty structs. Modified: head/sys/powerpc/include/proc.h Modified: head/sys/powerpc/include/proc.h ============================================================================== --- head/sys/powerpc/include/proc.h Mon Aug 12 19:44:28 2019 (r350952) +++ head/sys/powerpc/include/proc.h Mon Aug 12 19:44:57 2019 (r350953) @@ -46,9 +46,8 @@ struct mdthread { }; struct mdproc { - /* Avoid empty structs, that have undefined behavior in C99 and - * make compilers complain about it - * (empty struct has size 0 in C, size 1 in C++). + /* + * Avoid empty structs because they are undefined behavior. */ long md_spare; }; From owner-svn-src-head@freebsd.org Mon Aug 12 20:27:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A747DC127A; Mon, 12 Aug 2019 20:27:36 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466nTN4cj9z40sx; Mon, 12 Aug 2019 20:27: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 7F681444F; Mon, 12 Aug 2019 20:27: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 x7CKRack024361; Mon, 12 Aug 2019 20:27:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CKRYuK024349; Mon, 12 Aug 2019 20:27:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908122027.x7CKRYuK024349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Aug 2019 20:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350957 - in head: include/rpcsvc lib/libc/net lib/libc/rpc usr.sbin/rpc.yppasswdd usr.sbin/rpc.ypupdated usr.sbin/ypldap usr.sbin/yppush usr.sbin/ypserv X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: include/rpcsvc lib/libc/net lib/libc/rpc usr.sbin/rpc.yppasswdd usr.sbin/rpc.ypupdated usr.sbin/ypldap usr.sbin/yppush usr.sbin/ypserv X-SVN-Commit-Revision: 350957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 20:27:36 -0000 Author: kib Date: Mon Aug 12 20:27:33 2019 New Revision: 350957 URL: https://svnweb.freebsd.org/changeset/base/350957 Log: Increase YPMAXRECORD to 16M to be compatible with Linux. Since YP protocol definition uses the constant to declare variable-size opaque byte strings, the change should be binary compatible with existing installations which do not expose keys or values larger than 1024 bytes. All uses of local variables with YPMAXRECORD sizes were removed to avoid insane stack use. On the other hand, variables with static lifetime should be fine and only result in increased VA use. Glibc made same change, increasing the allowed length for keys and values in YP to 16M, in 2013. Reviewed by: markj Discussed with: ian Sponsored by: Mellanox Technologies MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D20900 Modified: head/include/rpcsvc/yp.x head/include/rpcsvc/yp_prot.h head/include/rpcsvc/ypxfrd.x head/lib/libc/net/gethostbynis.c head/lib/libc/net/getnetbynis.c head/lib/libc/net/getservent.c head/lib/libc/rpc/getrpcent.c head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c head/usr.sbin/rpc.ypupdated/yp_dbupdate.c head/usr.sbin/ypldap/yp.c head/usr.sbin/yppush/yppush_main.c head/usr.sbin/ypserv/yp_server.c Modified: head/include/rpcsvc/yp.x ============================================================================== --- head/include/rpcsvc/yp.x Mon Aug 12 20:21:36 2019 (r350956) +++ head/include/rpcsvc/yp.x Mon Aug 12 20:27:33 2019 (r350957) @@ -40,7 +40,7 @@ %__FBSDID("$FreeBSD$"); #endif -const YPMAXRECORD = 1024; +const YPMAXRECORD = 16777216; const YPMAXDOMAIN = 64; const YPMAXMAP = 64; const YPMAXPEER = 64; Modified: head/include/rpcsvc/yp_prot.h ============================================================================== --- head/include/rpcsvc/yp_prot.h Mon Aug 12 20:21:36 2019 (r350956) +++ head/include/rpcsvc/yp_prot.h Mon Aug 12 20:27:33 2019 (r350957) @@ -79,7 +79,7 @@ typedef u_int bool; #define YPPROG ((u_long)100004) #define YPVERS ((u_long)2) #define YPVERS_ORIG ((u_long)1) -#define YPMAXRECORD ((u_long)1024) +#define YPMAXRECORD ((u_long)16 * 1024 * 1024) #define YPMAXDOMAIN ((u_long)64) #define YPMAXMAP ((u_long)64) #define YPMAXPEER ((u_long)256) Modified: head/include/rpcsvc/ypxfrd.x ============================================================================== --- head/include/rpcsvc/ypxfrd.x Mon Aug 12 20:21:36 2019 (r350956) +++ head/include/rpcsvc/ypxfrd.x Mon Aug 12 20:27:33 2019 (r350957) @@ -70,7 +70,7 @@ #endif /* XXX cribbed from yp.x */ -const _YPMAXRECORD = 1024; +const _YPMAXRECORD = 16777216; const _YPMAXDOMAIN = 64; const _YPMAXMAP = 64; const _YPMAXPEER = 64; Modified: head/lib/libc/net/gethostbynis.c ============================================================================== --- head/lib/libc/net/gethostbynis.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/lib/libc/net/gethostbynis.c Mon Aug 12 20:27:33 2019 (r350957) @@ -58,7 +58,7 @@ _gethostbynis(const char *name, char *map, int af, str char *cp, **q; char *result; int resultlen, size, addrok = 0; - char ypbuf[YPMAXRECORD + 2]; + char *ypbuf; res_state statp; statp = __res_state(); @@ -88,10 +88,11 @@ _gethostbynis(const char *name, char *map, int af, str } /* avoid potential memory leak */ - bcopy((char *)result, (char *)&ypbuf, resultlen); + ypbuf = alloca(resultlen + 2); + bcopy(result, ypbuf, resultlen); ypbuf[resultlen] = '\0'; free(result); - result = (char *)&ypbuf; + result = ypbuf; if ((cp = strchr(result, '\n'))) *cp = '\0'; Modified: head/lib/libc/net/getnetbynis.c ============================================================================== --- head/lib/libc/net/getnetbynis.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/lib/libc/net/getnetbynis.c Mon Aug 12 20:27:33 2019 (r350957) @@ -58,7 +58,7 @@ _getnetbynis(const char *name, char *map, int af, stru char *cp, **q; char *result; int resultlen, len; - char ypbuf[YPMAXRECORD + 2]; + char *ypbuf; switch(af) { case AF_INET: @@ -77,10 +77,11 @@ _getnetbynis(const char *name, char *map, int af, stru &resultlen)) return (-1); - bcopy((char *)result, (char *)&ypbuf, resultlen); + ypbuf = alloca(resultlen + 2); + bcopy(result, ypbuf, resultlen); ypbuf[resultlen] = '\0'; free(result); - result = (char *)&ypbuf; + result = ypbuf; if ((cp = strchr(result, '\n'))) *cp = '\0'; Modified: head/lib/libc/net/getservent.c ============================================================================== --- head/lib/libc/net/getservent.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/lib/libc/net/getservent.c Mon Aug 12 20:27:33 2019 (r350957) @@ -664,7 +664,7 @@ nis_servent(void *retval, void *mdata, va_list ap) { char *resultbuf, *lastkey; int resultbuflen; - char buf[YPMAXRECORD + 2]; + char *buf; struct nis_state *st; int rv; @@ -681,6 +681,7 @@ nis_servent(void *retval, void *mdata, va_list ap) name = NULL; proto = NULL; + buf = NULL; how = (enum nss_lookup_type)mdata; switch (how) { case nss_lt_name: @@ -716,7 +717,10 @@ nis_servent(void *retval, void *mdata, va_list ap) do { switch (how) { case nss_lt_name: - snprintf(buf, sizeof(buf), "%s/%s", name, proto); + free(buf); + asprintf(&buf, "%s/%s", name, proto); + if (buf == NULL) + return (NS_TRYAGAIN); if (yp_match(st->yp_domain, "services.byname", buf, strlen(buf), &resultbuf, &resultbuflen)) { rv = NS_NOTFOUND; @@ -724,8 +728,10 @@ nis_servent(void *retval, void *mdata, va_list ap) } break; case nss_lt_id: - snprintf(buf, sizeof(buf), "%d/%s", ntohs(port), - proto); + free(buf); + asprintf(&buf, "%d/%s", ntohs(port), proto); + if (buf == NULL) + return (NS_TRYAGAIN); /* * We have to be a little flexible @@ -791,6 +797,7 @@ nis_servent(void *retval, void *mdata, va_list ap) } while (!(rv & NS_TERMINATE) && how == nss_lt_all); fin: + free(buf); if (rv == NS_SUCCESS && retval != NULL) *(struct servent **)retval = serv; Modified: head/lib/libc/rpc/getrpcent.c ============================================================================== --- head/lib/libc/rpc/getrpcent.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/lib/libc/rpc/getrpcent.c Mon Aug 12 20:27:33 2019 (r350957) @@ -400,7 +400,7 @@ nis_rpcent(void *retval, void *mdata, va_list ap) char *lastkey; char *resultbuf; int resultbuflen; - char buf[YPMAXRECORD + 2]; + char *buf; struct nis_state *st; int rv; @@ -422,6 +422,7 @@ nis_rpcent(void *retval, void *mdata, va_list ap) return (NS_NOTFOUND); } + buf = NULL; rpc = va_arg(ap, struct rpcent *); buffer = va_arg(ap, char *); bufsize = va_arg(ap, size_t); @@ -445,7 +446,10 @@ nis_rpcent(void *retval, void *mdata, va_list ap) case nss_lt_name: if (!st->no_name_map) { - snprintf(buf, sizeof buf, "%s", name); + free(buf); + asprintf(&buf, "%s", name); + if (buf == NULL) + return (NS_TRYAGAIN); rv = yp_match(st->domain, "rpc.byname", buf, strlen(buf), &resultbuf, &resultbuflen); @@ -473,7 +477,10 @@ nis_rpcent(void *retval, void *mdata, va_list ap) } break; case nss_lt_id: - snprintf(buf, sizeof buf, "%d", number); + free(buf); + asprintf(&buf, "%d", number); + if (buf == NULL) + return (NS_TRYAGAIN); if (yp_match(st->domain, "rpc.bynumber", buf, strlen(buf), &resultbuf, &resultbuflen)) { rv = NS_NOTFOUND; @@ -560,6 +567,7 @@ done: } while (!(rv & NS_TERMINATE) && (how == nss_lt_all)); fin: + free(buf); if ((rv == NS_SUCCESS) && (retval != NULL)) *((struct rpcent **)retval) = rpc; Modified: head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c ============================================================================== --- head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Mon Aug 12 20:27:33 2019 (r350957) @@ -323,15 +323,16 @@ update_inplace(struct passwd *pw, char *domain) DB *dbp = NULL; DBT key = { NULL, 0 }; DBT data = { NULL, 0 }; - char pwbuf[YPMAXRECORD]; + char *pwbuf; char keybuf[20]; int i; char *ptr = NULL; static char yp_last[] = "YP_LAST_MODIFIED"; - char yplastbuf[YPMAXRECORD]; + char yplastbuf[64]; snprintf(yplastbuf, sizeof yplastbuf, "%llu", (unsigned long long)time(NULL)); + pwbuf = NULL; for (i = 0; i < 4; i++) { @@ -364,12 +365,12 @@ update_inplace(struct passwd *pw, char *domain) if (yp_get_record(domain,maps[i],&key,&data,1) != YP_TRUE) { yp_error("couldn't read %s/%s: %s", domain, maps[i], strerror(errno)); - return(1); + goto ret1; } if ((ptr = strchr(data.data, ':')) == NULL) { yp_error("no colon in passwd record?!"); - return(1); + goto ret1; } /* @@ -393,8 +394,12 @@ with the same UID - continuing"); * We're really being ultra-paranoid here. * This is generally a 'can't happen' condition. */ - snprintf(pwbuf, sizeof pwbuf, ":%d:%d:", pw->pw_uid, - pw->pw_gid); + free(pwbuf); + asprintf(&pwbuf, ":%d:%d:", pw->pw_uid, pw->pw_gid); + if (pwbuf == NULL) { + yp_error("no memory"); + goto ret1; + } if (!strstr(data.data, pwbuf)) { yp_error("warning: found entry for user %s \ in map %s@%s with wrong UID", pw->pw_name, maps[i], domain); @@ -405,24 +410,30 @@ with the same name - continuing"); } if (i < 2) { - snprintf(pwbuf, sizeof pwbuf, formats[i], + free(pwbuf); + asprintf(&pwbuf, formats[i], pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, pw->pw_change, pw->pw_expire, pw->pw_gecos, pw->pw_dir, pw->pw_shell); } else { - snprintf(pwbuf, sizeof pwbuf, formats[i], + free(pwbuf); + asprintf(&pwbuf, formats[i], pw->pw_name, *(ptr+1) == '*' ? "*" : pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell); } + if (pwbuf == NULL) { + yp_error("no memory"); + goto ret1; + } #define FLAGS O_RDWR|O_CREAT if ((dbp = yp_open_db_rw(domain, maps[i], FLAGS)) == NULL) { yp_error("couldn't open %s/%s r/w: %s",domain, maps[i],strerror(errno)); - return(1); + goto ret1; } data.data = pwbuf; @@ -432,7 +443,7 @@ with the same name - continuing"); yp_error("failed to update record in %s/%s", domain, maps[i]); (void)(dbp->close)(dbp); - return(1); + goto ret1; } key.data = yp_last; @@ -444,13 +455,17 @@ with the same name - continuing"); yp_error("failed to update timestamp in %s/%s", domain, maps[i]); (void)(dbp->close)(dbp); - return(1); + goto ret1; } (void)(dbp->close)(dbp); } - return(0); + free(pwbuf); + return (0); +ret1: + free(pwbuf); + return (1); } int * Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c ============================================================================== --- head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Mon Aug 12 20:27:33 2019 (r350957) @@ -81,7 +81,7 @@ ypmap_update(char *netname, char *map, unsigned int op DB *dbp; DBT key = { NULL, 0 }, data = { NULL, 0 }; char *yp_last = "YP_LAST_MODIFIED"; - char yplastbuf[YPMAXRECORD]; + char yplastbuf[32]; char *domptr; int rval = 0; Modified: head/usr.sbin/ypldap/yp.c ============================================================================== --- head/usr.sbin/ypldap/yp.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/usr.sbin/ypldap/yp.c Mon Aug 12 20:27:33 2019 (r350957) @@ -323,7 +323,7 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req static struct ypresp_val res; const char *estr; char *bp, *cp; - char key[YPMAXRECORD+1]; + char *key; log_debug("matching '%.*s' in map %s", arg->key.keydat_len, arg->key.keydat_val, arg->map); @@ -342,7 +342,9 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req log_debug("argument too long"); return (NULL); } - memset(key, 0, sizeof(key)); + key = calloc(arg->key.keydat_len + 1, 1); + if (key == NULL) + return (NULL); (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); if (strcmp(arg->map, "passwd.byname") == 0 || @@ -351,23 +353,23 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req if ((ue = RB_FIND(user_name_tree, env->sc_user_names, &ukey)) == NULL) { res.stat = YP_NOKEY; - return (&res); + goto out; } yp_make_val(&res, ue->ue_line, 1); - return (&res); + goto out; } else if (strcmp(arg->map, "passwd.byuid") == 0 || strcmp(arg->map, "master.passwd.byuid") == 0) { ukey.ue_uid = strtonum(key, 0, UID_MAX, &estr); if (estr) { res.stat = YP_BADARGS; - return (&res); + goto out; } if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids, &ukey)) == NULL) { res.stat = YP_NOKEY; - return (&res); + goto out; } yp_make_val(&res, ue->ue_line, 1); @@ -376,12 +378,12 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req gkey.ge_gid = strtonum(key, 0, GID_MAX, &estr); if (estr) { res.stat = YP_BADARGS; - return (&res); + goto out; } if ((ge = RB_FIND(group_gid_tree, &env->sc_group_gids, &gkey)) == NULL) { res.stat = YP_NOKEY; - return (&res); + goto out; } yp_make_val(&res, ge->ge_line, 1); @@ -391,7 +393,7 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req if ((ge = RB_FIND(group_name_tree, env->sc_group_names, &gkey)) == NULL) { res.stat = YP_NOKEY; - return (&res); + goto out; } yp_make_val(&res, ge->ge_line, 1); @@ -401,46 +403,49 @@ ypproc_match_2_svc(ypreq_key *arg, struct svc_req *req if (strncmp(bp, "unix.", strlen("unix.")) != 0) { res.stat = YP_BADARGS; - return (&res); + goto out; } bp += strlen("unix."); if (*bp == '\0') { res.stat = YP_BADARGS; - return (&res); + goto out; } if (!(cp = strsep(&bp, "@"))) { res.stat = YP_BADARGS; - return (&res); + goto out; } if (strcmp(bp, arg->domain) != 0) { res.stat = YP_BADARGS; - return (&res); + goto out; } ukey.ue_uid = strtonum(cp, 0, UID_MAX, &estr); if (estr) { res.stat = YP_BADARGS; - return (&res); + goto out; } if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids, &ukey)) == NULL) { res.stat = YP_NOKEY; - return (&res); + goto out; } yp_make_val(&res, ue->ue_netid_line, 0); - return (&res); + goto out; } else { log_debug("unknown map %s", arg->map); res.stat = YP_NOMAP; - return (&res); + goto out; } +out: + free(key); + return (&res); } ypresp_key_val * @@ -479,14 +484,19 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) struct groupent *ge; char *line; static struct ypresp_key_val res; - char key[YPMAXRECORD+1]; + char *key; if (yp_valid_domain(arg->domain, (struct ypresp_val *)&res) == -1) return (&res); + key = NULL; if (strcmp(arg->map, "passwd.byname") == 0 || strcmp(arg->map, "master.passwd.byname") == 0) { - memset(key, 0, sizeof(key)); + key = calloc(arg->key.keydat_len + 1, 1); + if (key == NULL) { + res.stat = YP_YPERR; + return (&res); + } (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); ukey.ue_line = key; @@ -506,6 +516,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) RB_REMOVE(user_name_tree, env->sc_user_names, &ukey); res.stat = YP_NOKEY; + free(key); return (&res); } RB_REMOVE(user_name_tree, env->sc_user_names, &ukey); @@ -513,11 +524,16 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) line = ue->ue_line + (strlen(ue->ue_line) + 1); line = line + (strlen(line) + 1); yp_make_keyval(&res, line, line); + free(key); return (&res); } else if (strcmp(arg->map, "group.byname") == 0) { - memset(key, 0, sizeof(key)); + key = calloc(arg->key.keydat_len + 1, 1); + if (key == NULL) { + res.stat = YP_YPERR; + return (&res); + } (void)strncpy(key, arg->key.keydat_val, arg->key.keydat_len); @@ -533,6 +549,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) RB_REMOVE(group_name_tree, env->sc_group_names, &gkey); res.stat = YP_NOKEY; + free(key); return (&res); } RB_REMOVE(group_name_tree, env->sc_group_names, &gkey); @@ -541,6 +558,7 @@ ypproc_next_2_svc(ypreq_key *arg, struct svc_req *req) line = ge->ge_line + (strlen(ge->ge_line) + 1); line = line + (strlen(line) + 1); yp_make_keyval(&res, line, line); + free(key); return (&res); } else { log_debug("unknown map %s", arg->map); Modified: head/usr.sbin/yppush/yppush_main.c ============================================================================== --- head/usr.sbin/yppush/yppush_main.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/usr.sbin/yppush/yppush_main.c Mon Aug 12 20:27:33 2019 (r350957) @@ -438,15 +438,26 @@ static int yppush_foreach(int status, char *key, int keylen, char *val, int vallen, char *data) { - char server[YPMAXRECORD + 2]; + char *server; if (status != YP_TRUE) return (status); - snprintf(server, sizeof(server), "%.*s", vallen, val); - if (skip_master && strcasecmp(server, yppush_master) == 0) + asprintf(&server, "%.*s", vallen, val); + + /* + * Do not stop the iteration on the allocation failure. We + * cannot usefully react on low memory condition anyway, and + * the failure is more likely due to insane val. + */ + if (server == NULL) return (0); + if (skip_master && strcasecmp(server, yppush_master) == 0) { + free(server); + return (0); + } + /* * Restrict the number of concurrent jobs: if yppush_jobs number * of jobs have already been dispatched and are still pending, @@ -456,12 +467,15 @@ yppush_foreach(int status, char *key, int keylen, char ; /* Cleared for takeoff: set everything in motion. */ - if (yp_push(server, yppush_mapname, yppush_transid)) + if (yp_push(server, yppush_mapname, yppush_transid)) { + free(server); return(yp_errno); + } /* Bump the job counter and transaction ID. */ yppush_running_jobs++; yppush_transid++; + free(server); return (0); } Modified: head/usr.sbin/ypserv/yp_server.c ============================================================================== --- head/usr.sbin/ypserv/yp_server.c Mon Aug 12 20:21:36 2019 (r350956) +++ head/usr.sbin/ypserv/yp_server.c Mon Aug 12 20:27:33 2019 (r350957) @@ -173,8 +173,9 @@ ypproc_match_2_svc(ypreq_key *argp, struct svc_req *rq if (do_dns && result.stat != YP_TRUE && (strstr(argp->map, "hosts") || strstr(argp->map, "ipnodes"))) { #endif - char nbuf[YPMAXRECORD]; + char *nbuf; + nbuf = alloca(argp->key.keydat_len + 1); /* NUL terminate! NUL terminate!! NUL TERMINATE!!! */ bcopy(argp->key.keydat_val, nbuf, argp->key.keydat_len); nbuf[argp->key.keydat_len] = '\0'; From owner-svn-src-head@freebsd.org Mon Aug 12 21:51:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2D6BC2B73; Mon, 12 Aug 2019 21:51:48 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466qLX3vbTz44Kn; Mon, 12 Aug 2019 21:51:48 +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 67FC45411; Mon, 12 Aug 2019 21:51:48 +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 x7CLpmee074842; Mon, 12 Aug 2019 21:51:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CLpmqo074827; Mon, 12 Aug 2019 21:51:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908122151.x7CLpmqo074827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Aug 2019 21:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350961 - head/sys/dev/nvd X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvd X-SVN-Commit-Revision: 350961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 21:51:48 -0000 Author: mav Date: Mon Aug 12 21:51:47 2019 New Revision: 350961 URL: https://svnweb.freebsd.org/changeset/base/350961 Log: Missed part of r350523. MFC after: 3 days Modified: head/sys/dev/nvd/nvd.c Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Mon Aug 12 20:34:56 2019 (r350960) +++ head/sys/dev/nvd/nvd.c Mon Aug 12 21:51:47 2019 (r350961) @@ -277,17 +277,12 @@ nvd_gonecb(struct disk *dp) } static int -nvd_ioctl(struct disk *ndisk, u_long cmd, void *data, int fflag, +nvd_ioctl(struct disk *dp, u_long cmd, void *data, int fflag, struct thread *td) { - int ret = 0; + struct nvd_disk *ndisk = dp->d_drv1; - switch (cmd) { - default: - ret = EIO; - } - - return (ret); + return (nvme_ns_ioctl_process(ndisk->ns, cmd, data, fflag, td)); } static int From owner-svn-src-head@freebsd.org Mon Aug 12 22:58:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51B07C3D5E; Mon, 12 Aug 2019 22:58:15 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466rqC1G6pz46xj; Mon, 12 Aug 2019 22:58:15 +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 083605F4A; Mon, 12 Aug 2019 22:58:15 +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 x7CMwEax012817; Mon, 12 Aug 2019 22:58:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CMwDlX012812; Mon, 12 Aug 2019 22:58:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908122258.x7CMwDlX012812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Aug 2019 22:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350962 - in head/sys: amd64/conf conf i386/conf x86/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: amd64/conf conf i386/conf x86/conf X-SVN-Commit-Revision: 350962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 22:58:15 -0000 Author: imp Date: Mon Aug 12 22:58:13 2019 New Revision: 350962 URL: https://svnweb.freebsd.org/changeset/base/350962 Log: Start to split out the really x86 specific NOTES from the global notes file. Start with COMPAT_43, since it's really only relevant to x86. Reviewed by: jhb@ Differential Revision: https://reviews.freebsd.org/D21203 Added: head/sys/x86/conf/ head/sys/x86/conf/NOTES (contents, props changed) Modified: head/sys/amd64/conf/Makefile head/sys/conf/NOTES head/sys/conf/makeLINT.mk head/sys/i386/conf/Makefile Modified: head/sys/amd64/conf/Makefile ============================================================================== --- head/sys/amd64/conf/Makefile Mon Aug 12 21:51:47 2019 (r350961) +++ head/sys/amd64/conf/Makefile Mon Aug 12 22:58:13 2019 (r350962) @@ -2,4 +2,5 @@ TARGET=amd64 +NOTES= ${.CURDIR}/../../x86/conf/NOTES .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Aug 12 21:51:47 2019 (r350961) +++ head/sys/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) @@ -339,16 +339,6 @@ options UMTX_PROFILING ##################################################################### # COMPATIBILITY OPTIONS -# -# Implement system calls compatible with 4.3BSD and older versions of -# FreeBSD. You probably do NOT want to remove this as much current code -# still relies on the 4.3 emulation. Note that some architectures that -# are supported by FreeBSD do not include support for certain important -# aspects of this compatibility option, namely those related to the -# signal delivery mechanism. -# -options COMPAT_43 - # Old tty interface. options COMPAT_43TTY Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Mon Aug 12 21:51:47 2019 (r350961) +++ head/sys/conf/makeLINT.mk Mon Aug 12 22:58:13 2019 (r350962) @@ -12,7 +12,7 @@ clean: rm -f LINT-NOINET LINT-NOINET6 LINT-NOIP .endif -NOTES= ${.CURDIR}/../../conf/NOTES ${.CURDIR}/NOTES +NOTES+= ${.CURDIR}/../../conf/NOTES ${.CURDIR}/NOTES MAKELINT_SED= ${.CURDIR}/../../conf/makeLINT.sed LINT: ${NOTES} ${MAKELINT_SED} cat ${NOTES} | sed -E -n -f ${MAKELINT_SED} > ${.TARGET} Modified: head/sys/i386/conf/Makefile ============================================================================== --- head/sys/i386/conf/Makefile Mon Aug 12 21:51:47 2019 (r350961) +++ head/sys/i386/conf/Makefile Mon Aug 12 22:58:13 2019 (r350962) @@ -2,4 +2,5 @@ TARGET=i386 +NOTES= ${.CURDIR}/../../x86/conf/NOTES .include "${.CURDIR}/../../conf/makeLINT.mk" Added: head/sys/x86/conf/NOTES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# + +# Common NOTES between i386 and amd64 + + +##################################################################### +# COMPATIBILITY OPTIONS + +# Implement system calls compatible with 4.3BSD and older versions of +# FreeBSD. Needed for FreeBSD a.out support. Unneeded for ELF +# versions of FreeBSD. +options COMPAT_43 From owner-svn-src-head@freebsd.org Mon Aug 12 22:58:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 469AAC3DCE; Mon, 12 Aug 2019 22:58:46 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466rqp0P42z475V; Mon, 12 Aug 2019 22:58:46 +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 E37355F4E; Mon, 12 Aug 2019 22:58:45 +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 x7CMwjKM012901; Mon, 12 Aug 2019 22:58:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CMwitE012895; Mon, 12 Aug 2019 22:58:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908122258.x7CMwitE012895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Aug 2019 22:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350963 - in head/sys: arm/conf arm64/conf conf powerpc/conf sparc64/conf x86/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/conf arm64/conf conf powerpc/conf sparc64/conf x86/conf X-SVN-Commit-Revision: 350963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 22:58:46 -0000 Author: imp Date: Mon Aug 12 22:58:44 2019 New Revision: 350963 URL: https://svnweb.freebsd.org/changeset/base/350963 Log: Move sc out of the global file x86 needs sc, as does sparc64. powerpc doesn't use it by default, but some old powermac notebooks do not work with vt yet for reasons unknonw. Even so, I've removed it from powerpc LINT. It's not in daily use there, and the intent is to 100% switch to vt now that it works for that platform to limit support burden. All the other architectures omit some or all of the screen savers from their lint config. Move them to the x86 NOTES files and remove the exclusions. This reduces slightly the number of savers sparc64 compiles, but since they are in GENERIC, the overage is adequate and if someone reaelly wants to sort them out in sparc64 they can sweat the details and the testing. Reviewed by: jhb (earlier version), manu (earlier version), jhibbits Differential Revision: https://reviews.freebsd.org/D21233 Modified: head/sys/arm/conf/NOTES head/sys/arm64/conf/NOTES head/sys/conf/NOTES head/sys/powerpc/conf/NOTES head/sys/sparc64/conf/NOTES head/sys/x86/conf/NOTES Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) +++ head/sys/arm/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) @@ -18,19 +18,6 @@ nooptions MAXCPU # value is set in machine/param.h nodevice fdc nodevice sym -nodevice sc -nodevice blank_saver -nodevice daemon_saver -nodevice dragon_saver -nodevice fade_saver -nodevice fire_saver -nodevice green_saver -nodevice logo_saver -nodevice rain_saver -nodevice snake_saver -nodevice star_saver -nodevice warp_saver - nodevice ccr nodevice cxgbe nodevice cxgbev Modified: head/sys/arm64/conf/NOTES ============================================================================== --- head/sys/arm64/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) +++ head/sys/arm64/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) @@ -211,20 +211,6 @@ nodevice fdc # arm64 doesn't support inb/outb, so disable chipset probing which needs it nooptions PPC_PROBE_CHIPSET -# can't support syscons, no inb/outb, ditto for the screen savers -nodevice sc -nodevice blank_saver -nodevice daemon_saver -nodevice dragon_saver -nodevice fade_saver -nodevice fire_saver -nodevice green_saver -nodevice logo_saver -nodevice rain_saver -nodevice snake_saver -nodevice star_saver -nodevice warp_saver - # These cause weird issues, not sure why nodevice ukbd nooptions DEBUG Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) +++ head/sys/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) @@ -1457,67 +1457,6 @@ makeoptions KBDMUX_DFLT_KEYMAP=it.iso options FB_DEBUG # Frame buffer debugging -device splash # Splash screen and screen saver support - -# Various screen savers. -device blank_saver -device daemon_saver -device dragon_saver -device fade_saver -device fire_saver -device green_saver -device logo_saver -device rain_saver -device snake_saver -device star_saver -device warp_saver - -# The syscons console driver (SCO color console compatible). -device sc -hint.sc.0.at="isa" -options MAXCONS=16 # number of virtual consoles -options SC_ALT_MOUSE_IMAGE # simplified mouse cursor in text mode -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp850 -options SC_DFLT_TERM=\"sc\" # default terminal emulator -options SC_DISABLE_KDBKEY # disable `debug' key -options SC_DISABLE_REBOOT # disable reboot key sequence -options SC_HISTORY_SIZE=200 # number of history buffer lines -options SC_MOUSE_CHAR=0x3 # char code for text mode mouse cursor -options SC_PIXEL_MODE # add support for the raster text mode - -# The following options will let you change the default colors of syscons. -options SC_NORM_ATTR=(FG_GREEN|BG_BLACK) -options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN) -options SC_KERNEL_CONS_ATTR=(FG_RED|BG_BLACK) -options SC_KERNEL_CONS_ATTRS=\"\x0c\x0d\x0e\x0f\x02\x09\x0a\x0b\" -options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED) - -# The following options will let you change the default behavior of -# cut-n-paste feature -options SC_CUT_SPACES2TABS # convert leading spaces into tabs -options SC_CUT_SEPCHARS=\"x09\" # set of characters that delimit words - # (default is single space - \"x20\") - -# If you have a two button mouse, you may want to add the following option -# to use the right button of the mouse to paste text. -options SC_TWOBUTTON_MOUSE - -# You can selectively disable features in syscons. -options SC_NO_CUTPASTE -options SC_NO_FONT_LOADING -options SC_NO_HISTORY -options SC_NO_MODE_CHANGE -options SC_NO_SYSMOUSE -options SC_NO_SUSPEND_VTYSWITCH -#!options SC_NO_TERM_DUMB -#!options SC_NO_TERM_SC -#!options SC_NO_TERM_SCTEKEN - -# `flags' for sc -# 0x80 Put the video card in the VESA 800x600 dots, 16 color mode -# 0x100 Probe for a keyboard device periodically if one is not present - # Enable experimental features of the syscons terminal emulator (teken). options TEKEN_CONS25 # cons25-style terminal emulation options TEKEN_UTF8 # UTF-8 output handling Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) +++ head/sys/powerpc/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) @@ -46,8 +46,6 @@ options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator options MAMBO #IBM Mambo Full System Simulator -options SC_OFWFB # OFW frame buffer - # The cpufreq(4) driver provides support for CPU frequency control device cpufreq @@ -82,22 +80,6 @@ nodevice fdc nodevice mpr # no 64-bit atomics nodevice mps # no 64-bit atomics nodevice ppc -nodevice splash -# when splash works enable *_saver -nodevice blank_saver -nodevice daemon_saver -nodevice dragon_saver -nodevice fade_saver -nodevice fire_saver -nodevice green_saver -nodevice logo_saver -nodevice rain_saver -nodevice snake_saver -nodevice star_saver -nodevice warp_saver -nodevice daemon_saver -nodevice star_saver -nodevice snake_saver # sound nodevice snd_cmi # wants gdb_cur @@ -110,5 +92,4 @@ nodevice dcons_crom nooption PPC_DEBUG nooption PPC_PROBE_CHIPSET -nooption SC_NO_MODE_CHANGE nooption UKBD_DFLT_KEYMAP Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) +++ head/sys/sparc64/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) @@ -85,13 +85,44 @@ options SUNKBD_EMULATE_ATKBD # allows to use the AT k options SUNKBD_DFLT_KEYMAP # specify the built-in keymap makeoptions SUNKBD_DFLT_KEYMAP=fr.dvorak +# The syscons console driver (SCO color console compatible). +device sc +hint.sc.0.at="isa" +options MAXCONS=16 # number of virtual consoles +options SC_DFLT_TERM=\"sc\" # default terminal emulator +options SC_DISABLE_KDBKEY # disable `debug' key +options SC_DISABLE_REBOOT # disable reboot key sequence +options SC_HISTORY_SIZE=200 # number of history buffer lines +options SC_MOUSE_CHAR=0x3 # char code for text mode mouse cursor +options SC_PIXEL_MODE # add support for the raster text mode + +# The following options will let you change the default behavior of +# cut-n-paste feature +options SC_CUT_SPACES2TABS # convert leading spaces into tabs +options SC_CUT_SEPCHARS=\"x09\" # set of characters that delimit words + # (default is single space - \"x20\") + +# If you have a two button mouse, you may want to add the following option +# to use the right button of the mouse to paste text. +options SC_TWOBUTTON_MOUSE + +# You can selectively disable features in syscons. +options SC_NO_CUTPASTE +options SC_NO_HISTORY +options SC_NO_MODE_CHANGE +options SC_NO_SYSMOUSE +#!options SC_NO_TERM_DUMB +#!options SC_NO_TERM_SC +#!options SC_NO_TERM_SCTEKEN + +# `flags' for sc +# 0x80 Put the video card in the VESA 800x600 dots, 16 color mode +# 0x100 Probe for a keyboard device periodically if one is not present + ##################################################################### # Devices we don't want to deal with -nodevice daemon_saver -nodevice snake_saver -nodevice star_saver nodevice bktr nodevice fdc nodevice ppc @@ -130,14 +161,6 @@ nooption SC_RENDER_DEBUG nooption SC_DEBUG_LEVEL nooption PPC_DEBUG nooption PPC_PROBE_CHIPSET -nooption SC_NO_SUSPEND_VTYSWITCH -nooption SC_NO_FONT_LOADING -nooption SC_KERNEL_CONS_REV_ATTR -nooption SC_KERNEL_CONS_ATTR -nooption SC_NORM_REV_ATTR -nooption SC_NORM_ATTR -nooption SC_DFLT_FONT -nooption SC_ALT_MOUSE_IMAGE nooption EXT2FS Modified: head/sys/x86/conf/NOTES ============================================================================== --- head/sys/x86/conf/NOTES Mon Aug 12 22:58:13 2019 (r350962) +++ head/sys/x86/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) @@ -7,7 +7,74 @@ ##################################################################### # COMPATIBILITY OPTIONS -# Implement system calls compatible with 4.3BSD and older versions of -# FreeBSD. Needed for FreeBSD a.out support. Unneeded for ELF -# versions of FreeBSD. +# Implement system calls compatible with 4.3BSD and FreeBSD 1.x, +# and 2.x a.out binaries. Not needed for ELF binaries, or newer +# a.out binaries. options COMPAT_43 + + +##################################################################### +# HARDWARE DEVICE CONFIGURATION + +# The syscons console driver (SCO color console compatible). +device sc +hint.sc.0.at="isa" +options MAXCONS=16 # number of virtual consoles +options SC_ALT_MOUSE_IMAGE # simplified mouse cursor in text mode +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp850 +options SC_DFLT_TERM=\"sc\" # default terminal emulator +options SC_DISABLE_KDBKEY # disable `debug' key +options SC_DISABLE_REBOOT # disable reboot key sequence +options SC_HISTORY_SIZE=200 # number of history buffer lines +options SC_MOUSE_CHAR=0x3 # char code for text mode mouse cursor +options SC_PIXEL_MODE # add support for the raster text mode + +# The following options will let you change the default colors of syscons. +options SC_NORM_ATTR=(FG_GREEN|BG_BLACK) +options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN) +options SC_KERNEL_CONS_ATTR=(FG_RED|BG_BLACK) +options SC_KERNEL_CONS_ATTRS=\"\x0c\x0d\x0e\x0f\x02\x09\x0a\x0b\" +options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED) + +# The following options will let you change the default behavior of +# cut-n-paste feature +options SC_CUT_SPACES2TABS # convert leading spaces into tabs +options SC_CUT_SEPCHARS=\"x09\" # set of characters that delimit words + # (default is single space - \"x20\") + +# If you have a two button mouse, you may want to add the following option +# to use the right button of the mouse to paste text. +options SC_TWOBUTTON_MOUSE + +# You can selectively disable features in syscons. +options SC_NO_CUTPASTE +options SC_NO_FONT_LOADING +options SC_NO_HISTORY +options SC_NO_MODE_CHANGE +options SC_NO_SYSMOUSE +options SC_NO_SUSPEND_VTYSWITCH +#!options SC_NO_TERM_DUMB +#!options SC_NO_TERM_SC +#!options SC_NO_TERM_SCTEKEN + +# `flags' for sc +# 0x80 Put the video card in the VESA 800x600 dots, 16 color mode +# 0x100 Probe for a keyboard device periodically if one is not present + +# Splash screen and screen saver support +device splash + +# Various screen savers. +device blank_saver +device daemon_saver +device dragon_saver +device fade_saver +device fire_saver +device green_saver +device logo_saver +device rain_saver +device snake_saver +device star_saver +device warp_saver + From owner-svn-src-head@freebsd.org Mon Aug 12 22:58:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 982E0C3E02; Mon, 12 Aug 2019 22:58:52 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466rqw3Z0Tz47CX; Mon, 12 Aug 2019 22:58:52 +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 5C9435F4F; Mon, 12 Aug 2019 22:58:52 +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 x7CMwqC2012960; Mon, 12 Aug 2019 22:58:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CMwpru012952; Mon, 12 Aug 2019 22:58:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908122258.x7CMwpru012952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Aug 2019 22:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350964 - in head/sys: arm/conf arm64/conf conf powerpc/conf sparc64/conf x86/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/conf arm64/conf conf powerpc/conf sparc64/conf x86/conf X-SVN-Commit-Revision: 350964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 22:58:52 -0000 Author: imp Date: Mon Aug 12 22:58:50 2019 New Revision: 350964 URL: https://svnweb.freebsd.org/changeset/base/350964 Log: Floppy driver really only works on x86 Move the floppy driver to the x86 specific notes file. Reviewed by: jhb, manu, jhibbits, emaste Differential Revision: https://reviews.freebsd.org/D21208 Modified: head/sys/arm/conf/NOTES head/sys/arm64/conf/NOTES head/sys/conf/NOTES head/sys/powerpc/conf/NOTES head/sys/sparc64/conf/NOTES head/sys/x86/conf/NOTES Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) +++ head/sys/arm/conf/NOTES Mon Aug 12 22:58:50 2019 (r350964) @@ -15,7 +15,6 @@ nooptions MAXCPU # value is set in machine/param.h # Devices in sys/conf/NOTES for which no such hardware exists on arm, # or the drivers don't compile... -nodevice fdc nodevice sym nodevice ccr Modified: head/sys/arm64/conf/NOTES ============================================================================== --- head/sys/arm64/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) +++ head/sys/arm64/conf/NOTES Mon Aug 12 22:58:50 2019 (r350964) @@ -205,9 +205,6 @@ options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PRO # bring in camified MMC too options MMCCAM -# No support for floppies on arm64 -nodevice fdc - # arm64 doesn't support inb/outb, so disable chipset probing which needs it nooptions PPC_PROBE_CHIPSET Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) +++ head/sys/conf/NOTES Mon Aug 12 22:58:50 2019 (r350964) @@ -1698,32 +1698,6 @@ hint.ata.1.port="0x170" hint.ata.1.irq="15" # -# Standard floppy disk controllers and floppy tapes, supports -# the Y-E DATA External FDD (PC Card) -# -device fdc -hint.fdc.0.at="isa" -hint.fdc.0.port="0x3F0" -hint.fdc.0.irq="6" -hint.fdc.0.drq="2" -# -# FDC_DEBUG enables floppy debugging. Since the debug output is huge, you -# gotta turn it actually on by setting the variable fd_debug with DDB, -# however. -options FDC_DEBUG -# -# Activate this line if you happen to have an Insight floppy tape. -# Probing them proved to be dangerous for people with floppy disks only, -# so it's "hidden" behind a flag: -#hint.fdc.0.flags="1" - -# Specify floppy devices -hint.fd.0.at="fdc0" -hint.fd.0.drive="0" -hint.fd.1.at="fdc0" -hint.fd.1.drive="1" - -# # uart: newbusified driver for serial interfaces. It consolidates the sio(4), # sab(4) and zs(4) drivers. # Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) +++ head/sys/powerpc/conf/NOTES Mon Aug 12 22:58:50 2019 (r350964) @@ -76,7 +76,6 @@ nodevice bktr nodevice ccr nodevice cxgbe # XXX: builds on powerpc64 only. nodevice cxgbev -nodevice fdc nodevice mpr # no 64-bit atomics nodevice mps # no 64-bit atomics nodevice ppc Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) +++ head/sys/sparc64/conf/NOTES Mon Aug 12 22:58:50 2019 (r350964) @@ -124,7 +124,6 @@ options SC_NO_SYSMOUSE # Devices we don't want to deal with nodevice bktr -nodevice fdc nodevice ppc nodevice snd_ad1816 nodevice snd_als4000 @@ -155,7 +154,6 @@ nodevice snd_uaudio ##################################################################### # Options we don't want to deal with -nooption FDC_DEBUG nooption COMPAT_FREEBSD4 nooption SC_RENDER_DEBUG nooption SC_DEBUG_LEVEL Modified: head/sys/x86/conf/NOTES ============================================================================== --- head/sys/x86/conf/NOTES Mon Aug 12 22:58:44 2019 (r350963) +++ head/sys/x86/conf/NOTES Mon Aug 12 22:58:50 2019 (r350964) @@ -78,3 +78,28 @@ device snake_saver device star_saver device warp_saver +# +# Standard floppy disk controllers and floppy tapes, supports +# the Y-E DATA External FDD (PC Card) +# +device fdc +hint.fdc.0.at="isa" +hint.fdc.0.port="0x3F0" +hint.fdc.0.irq="6" +hint.fdc.0.drq="2" +# +# FDC_DEBUG enables floppy debugging. Since the debug output is huge, you +# gotta turn it actually on by setting the variable fd_debug with DDB, +# however. +options FDC_DEBUG +# +# Activate this line if you happen to have an Insight floppy tape. +# Probing them proved to be dangerous for people with floppy disks only, +# so it's "hidden" behind a flag: +#hint.fdc.0.flags="1" + +# Specify floppy devices +hint.fd.0.at="fdc0" +hint.fd.0.drive="0" +hint.fd.1.at="fdc0" +hint.fd.1.drive="1" From owner-svn-src-head@freebsd.org Mon Aug 12 22:58:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02BEBC3E4C; Mon, 12 Aug 2019 22:58:58 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466rr14WJZz47JG; Mon, 12 Aug 2019 22:58:57 +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 73E2A5F50; Mon, 12 Aug 2019 22:58:57 +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 x7CMwvLF013014; Mon, 12 Aug 2019 22:58:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CMwulJ013011; Mon, 12 Aug 2019 22:58:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908122258.x7CMwulJ013011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Aug 2019 22:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350965 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 22:58:58 -0000 Author: imp Date: Mon Aug 12 22:58:56 2019 New Revision: 350965 URL: https://svnweb.freebsd.org/changeset/base/350965 Log: Create files.x86 files.x86 is for the parts of the system that are common to both i386 and amd64 due too their nature. First up, to get the ball rolling, is fdc, the floppy disk support. It works only on amd64 and i386 these days, and that's unlikely to change. Reviewed by: jhb, cem (earlier versrions) Differential Revision: https://reviews.freebsd.org/D21210 Added: head/sys/conf/files.x86 (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Aug 12 22:58:50 2019 (r350964) +++ head/sys/conf/files.amd64 Mon Aug 12 22:58:56 2019 (r350965) @@ -3,6 +3,10 @@ # # $FreeBSD$ # + +# common files stuff between i386 and amd64 +include "conf/files.x86" + # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. @@ -298,10 +302,6 @@ dev/ixl/i40e_adminq.c optional ixl pci | iavf pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/i40e_dcb.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/fdc/fdc.c optional fdc -dev/fdc/fdc_acpi.c optional fdc -dev/fdc/fdc_isa.c optional fdc isa -dev/fdc/fdc_pccard.c optional fdc pccard dev/gpio/bytgpio.c optional bytgpio dev/gpio/chvgpio.c optional chvgpio dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Aug 12 22:58:50 2019 (r350964) +++ head/sys/conf/files.i386 Mon Aug 12 22:58:56 2019 (r350965) @@ -3,6 +3,10 @@ # # $FreeBSD$ # + +# common files stuff between i386 and amd64 +include "conf/files.x86" + # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. @@ -208,10 +212,6 @@ dev/fb/fb.c optional fb | vga dev/fb/s3_pci.c optional s3pci dev/fb/vesa.c optional vga vesa dev/fb/vga.c optional vga -dev/fdc/fdc.c optional fdc -dev/fdc/fdc_acpi.c optional fdc -dev/fdc/fdc_isa.c optional fdc isa -dev/fdc/fdc_pccard.c optional fdc pccard dev/fe/if_fe_isa.c optional fe isa dev/glxiic/glxiic.c optional glxiic dev/glxsb/glxsb.c optional glxsb Added: head/sys/conf/files.x86 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/files.x86 Mon Aug 12 22:58:56 2019 (r350965) @@ -0,0 +1,14 @@ +# This file tells config what files go into building a kernel, +# files marked standard are always included. +# +# $FreeBSD$ +# +# This file contains all the x86 devices and such that are +# common between i386 and amd64, but aren't applicable to +# any other architecture we support. +# + +dev/fdc/fdc.c optional fdc +dev/fdc/fdc_acpi.c optional fdc +dev/fdc/fdc_isa.c optional fdc isa +dev/fdc/fdc_pccard.c optional fdc pccard From owner-svn-src-head@freebsd.org Mon Aug 12 23:25:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF48FC47A7; Mon, 12 Aug 2019 23:25:16 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466sQN45ZZz48WM; Mon, 12 Aug 2019 23:25:16 +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 6A10164AC; Mon, 12 Aug 2019 23:25:16 +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 x7CNPGhS030238; Mon, 12 Aug 2019 23:25:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CNPFtI030232; Mon, 12 Aug 2019 23:25:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908122325.x7CNPFtI030232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Aug 2019 23:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350966 - in head/sys: arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm64/conf conf X-SVN-Commit-Revision: 350966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 23:25:16 -0000 Author: imp Date: Mon Aug 12 23:25:14 2019 New Revision: 350966 URL: https://svnweb.freebsd.org/changeset/base/350966 Log: ukbdmap.h rule was identical on all platforms, so move them into sys/conf/files. This allows us to remove 'nodevice ukbd' from the arm64 NOTES file. Modified: head/sys/arm64/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.arm head/sys/conf/files.i386 head/sys/conf/files.sparc64 Modified: head/sys/arm64/conf/NOTES ============================================================================== --- head/sys/arm64/conf/NOTES Mon Aug 12 22:58:56 2019 (r350965) +++ head/sys/arm64/conf/NOTES Mon Aug 12 23:25:14 2019 (r350966) @@ -209,7 +209,6 @@ options MMCCAM nooptions PPC_PROBE_CHIPSET # These cause weird issues, not sure why -nodevice ukbd nooptions DEBUG # Makes assumptions about bus tags that aren't true on arm64 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Aug 12 22:58:56 2019 (r350965) +++ head/sys/conf/files Mon Aug 12 23:25:14 2019 (r350966) @@ -58,6 +58,10 @@ teken_state.h optional sc | vt \ compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ clean "teken_state.h" +ukbdmap.h optional ukbd_dflt_keymap \ + compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ + no-obj no-implicit-rule before-depend \ + clean "ukbdmap.h" usbdevs.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Aug 12 22:58:56 2019 (r350965) +++ head/sys/conf/files.amd64 Mon Aug 12 23:25:14 2019 (r350966) @@ -82,11 +82,6 @@ atkbdmap.h optional atkbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # -ukbdmap.h optional ukbd_dflt_keymap \ - compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ - no-obj no-implicit-rule before-depend \ - clean "ukbdmap.h" -# hpt27xx_lib.o optional hpt27xx \ dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Aug 12 22:58:56 2019 (r350965) +++ head/sys/conf/files.arm Mon Aug 12 23:25:14 2019 (r350966) @@ -166,12 +166,6 @@ cloudabi32_vdso_blob.o optional compat_cloudabi32 \ clean "cloudabi32_vdso_blob.o" # -# -ukbdmap.h optional ukbd_dflt_keymap \ - compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ - no-obj no-implicit-rule before-depend \ - clean "ukbdmap.h" - # Annapurna support arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Aug 12 22:58:56 2019 (r350965) +++ head/sys/conf/files.i386 Mon Aug 12 23:25:14 2019 (r350966) @@ -57,11 +57,6 @@ atkbdmap.h optional atkbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # -ukbdmap.h optional ukbd_dflt_keymap \ - compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ - no-obj no-implicit-rule before-depend \ - clean "ukbdmap.h" -# hpt27xx_lib.o optional hpt27xx \ dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Mon Aug 12 22:58:56 2019 (r350965) +++ head/sys/conf/files.sparc64 Mon Aug 12 23:25:14 2019 (r350966) @@ -17,11 +17,6 @@ sunkbdmap.h optional sunkbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "sunkbdmap.h" # -ukbdmap.h optional ukbd_dflt_keymap \ - compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ - no-obj no-implicit-rule before-depend \ - clean "ukbdmap.h" -# cddl/contrib/opensolaris/common/atomic/sparc64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb From owner-svn-src-head@freebsd.org Mon Aug 12 23:25:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A637C47CE; Mon, 12 Aug 2019 23:25:22 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466sQV0Lmgz48Z5; Mon, 12 Aug 2019 23:25:22 +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 E19E864AD; Mon, 12 Aug 2019 23:25:21 +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 x7CNPLQI030294; Mon, 12 Aug 2019 23:25:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CNPLRM030293; Mon, 12 Aug 2019 23:25:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908122325.x7CNPLRM030293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Aug 2019 23:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350967 - in head/sys: conf powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf powerpc/conf X-SVN-Commit-Revision: 350967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 12 Aug 2019 23:25:22 -0000 Author: imp Date: Mon Aug 12 23:25:21 2019 New Revision: 350967 URL: https://svnweb.freebsd.org/changeset/base/350967 Log: Fix powerpc LINT build tcpratelimit isn't supported as there's now atomic_add_64, so add it to the exclusion list Add comment for why PPC_PROBE_CHIPSET is on the list Remove UKBD_DFLT_KEYMAP now that ukbd works on all platforms. Modified: head/sys/conf/makeLINT.mk head/sys/powerpc/conf/NOTES Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Mon Aug 12 23:25:14 2019 (r350966) +++ head/sys/conf/makeLINT.mk Mon Aug 12 23:25:21 2019 (r350967) @@ -64,4 +64,5 @@ LINT: ${NOTES} ${MAKELINT_SED} echo "nodevice mlx5" >> ${.TARGET} echo "nodevice mlx5en" >> ${.TARGET} echo "nodevice mlx5ib" >> ${.TARGET} + echo "nooptions RATELIMIT" >> ${.TARGET} .endif Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Mon Aug 12 23:25:14 2019 (r350966) +++ head/sys/powerpc/conf/NOTES Mon Aug 12 23:25:21 2019 (r350967) @@ -90,5 +90,4 @@ nodevice dcons_crom # Options we don't want to deal with nooption PPC_DEBUG -nooption PPC_PROBE_CHIPSET -nooption UKBD_DFLT_KEYMAP +nooption PPC_PROBE_CHIPSET # uses inb/outb From owner-svn-src-head@freebsd.org Tue Aug 13 01:24:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8F68C6E6D; Tue, 13 Aug 2019 01:24:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466w4C4T5Fz4FW4; Tue, 13 Aug 2019 01:24:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B0FA7A7B; Tue, 13 Aug 2019 01:24:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7D1OhWS001527; Tue, 13 Aug 2019 01:24:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7D1Oh1H001526; Tue, 13 Aug 2019 01:24:43 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201908130124.x7D1Oh1H001526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 13 Aug 2019 01:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350969 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 350969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 01:24:43 -0000 Author: pfg Date: Tue Aug 13 01:24:43 2019 New Revision: 350969 URL: https://svnweb.freebsd.org/changeset/base/350969 Log: Add deprecation notice to snd_ds1(4). As suggested in: https://wiki.freebsd.org/WhatsGoing/FreeBSD13 We will be dropping the snd_ds1 driver. The driver is known to be buggy and no one has been working on it for years now. Users of old Yamaha cards may have luck with the OSS drivers instead. MFC after: 3 days Diferential Revision: https://reviews.freebsd.org/D21138 Modified: head/share/man/man4/snd_ds1.4 Modified: head/share/man/man4/snd_ds1.4 ============================================================================== --- head/share/man/man4/snd_ds1.4 Mon Aug 12 23:44:03 2019 (r350968) +++ head/share/man/man4/snd_ds1.4 Tue Aug 13 01:24:43 2019 (r350969) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2005 +.Dd August 12, 2019 .Dt SND_DS1 4 .Os .Sh NAME @@ -68,5 +68,9 @@ The .Nm device driver first appeared in .Fx 4.1 . +.Pp +This driver will be removed in a future version of the +.Fx base system. +Users who require it may have better luck with the audio/oss port or package. .Sh AUTHORS .An Cameron Grant Aq Mt cg@FreeBSD.org From owner-svn-src-head@freebsd.org Tue Aug 13 01:25:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5E83C6EFD; Tue, 13 Aug 2019 01:25:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466w4g43Hdz4Fdh; Tue, 13 Aug 2019 01:25:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CB787A7C; Tue, 13 Aug 2019 01:25:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7D1P7J7001602; Tue, 13 Aug 2019 01:25:07 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7D1P7Od001601; Tue, 13 Aug 2019 01:25:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201908130125.x7D1P7Od001601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 13 Aug 2019 01:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350970 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 350970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 01:25:07 -0000 Author: pfg Date: Tue Aug 13 01:25:07 2019 New Revision: 350970 URL: https://svnweb.freebsd.org/changeset/base/350970 Log: Add deprecation notice to snd_maestro(4). As suggested in: https://wiki.freebsd.org/WhatsGoing/FreeBSD13 this old driver is buggy and no one is working on it so we should deprecate it for the next release. MFC after: 3 days Diferential Revision: https://reviews.freebsd.org/D21139 Modified: head/share/man/man4/snd_maestro.4 Modified: head/share/man/man4/snd_maestro.4 ============================================================================== --- head/share/man/man4/snd_maestro.4 Tue Aug 13 01:24:43 2019 (r350969) +++ head/share/man/man4/snd_maestro.4 Tue Aug 13 01:25:07 2019 (r350970) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2005 +.Dd August 12, 2019 .Dt SND_MAESTRO 4 .Os .Sh NAME @@ -73,6 +73,9 @@ The .Nm device driver first appeared in .Fx 4.2 . +.Pp +This driver will be removed in a future version of the +.Fx base system. .Sh AUTHORS This manual page was written by .An Jorge Mario G. Mazo Aq Mt jgutie11@eafit.edu.co . From owner-svn-src-head@freebsd.org Tue Aug 13 03:49:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E342CA996; Tue, 13 Aug 2019 03:49:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466zHj73W7z4MtR; Tue, 13 Aug 2019 03:49:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAE9C947E; Tue, 13 Aug 2019 03:49:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7D3nree085343; Tue, 13 Aug 2019 03:49:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7D3nr6x085342; Tue, 13 Aug 2019 03:49:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201908130349.x7D3nr6x085342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 13 Aug 2019 03:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350971 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 350971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 03:49:54 -0000 Author: ian Date: Tue Aug 13 03:49:53 2019 New Revision: 350971 URL: https://svnweb.freebsd.org/changeset/base/350971 Log: Fix the driver name in ads111x.4, and hook the manpage up to the build. The driver was originally written with the name ads1115, but at the last minute it got renamed to ads111x to reflect its support for many related chips, but I forgot to update the manpage to match the renaming before committing it all. Modified: head/share/man/man4/Makefile head/share/man/man4/ads111x.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Aug 13 01:25:07 2019 (r350970) +++ head/share/man/man4/Makefile Tue Aug 13 03:49:53 2019 (r350971) @@ -21,6 +21,7 @@ MAN= aac.4 \ ${_acpi_wmi.4} \ ada.4 \ adm6996fc.4 \ + ads111x.4 \ ae.4 \ ${_aesni.4} \ age.4 \ @@ -568,7 +569,13 @@ MAN= aac.4 \ xpt.4 \ zero.4 -MLINKS= ae.4 if_ae.4 +MLINKS= ads111x.4 ads1013.4 \ + ads111x.4 ads1014.4 \ + ads111x.4 ads1015.4 \ + ads111x.4 ads1113.4 \ + ads111x.4 ads1114.4 \ + ads111x.4 ads1115.4 +MLINKS+=ae.4 if_ae.4 MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 MLINKS+=alc.4 if_alc.4 Modified: head/share/man/man4/ads111x.4 ============================================================================== --- head/share/man/man4/ads111x.4 Tue Aug 13 01:25:07 2019 (r350970) +++ head/share/man/man4/ads111x.4 Tue Aug 13 03:49:53 2019 (r350971) @@ -24,25 +24,25 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2019 -.Dt ADS1115 4 +.Dd August 12, 2019 +.Dt ADS111x 4 .Os .Sh NAME -.Nm ads1115 +.Nm ads111x .Nd driver for ADS101x and ADS111x i2c analog to digital converters .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device ads1115" +.Cd "device ads111x" .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 -ads1115_load="YES" +ads111x_load="YES" .Ed .Sh DESCRIPTION The @@ -58,7 +58,7 @@ set via hints, FDT data, and .Xr Sysctl 8 provides access to the voltage measurements made by the device. Each time the -.Va dev.ads1115...voltage +.Va dev.ads111x...voltage variable is accessed for a given channel, the driver switches the chip's internal mux to choose the right input pins for that channel, directs it to make a single measurement, and returns the measured value @@ -106,16 +106,16 @@ All writeable variables may also be set as tunables. Channel numbers in these sysctl variables range from 0 through 7. .Bl -tag -width indent -.It Va dev.ads1115..config +.It Va dev.ads111x..config Provides access to the configuration register bits that control the alert pin configuration. Other bits which are controlled by the driver are masked out, and cannot be viewed or changed using this variable. -.It Va dev.ads1115..lo_thresh +.It Va dev.ads111x..lo_thresh Sets the low threshold for activating the alert pin. -.It Va dev.ads1115..hi_thresh +.It Va dev.ads111x..hi_thresh Sets the high threshold for activating the alert pin. -.It Va dev.ads1115...rate_index +.It Va dev.ads111x...rate_index Sets the sample rate for the channel. The device datasheet documents eight available sample rates, chosen by setting a value of 0 through 7 into the corresponding control @@ -126,7 +126,7 @@ measurement on the given channel. Because measurements are always made in single-shot mode, think of this variable as controlling the averaging time for a single sample; the time to make a measurement is 1 / samplerate. -.It Va dev.ads1115...gain_index +.It Va dev.ads111x...gain_index Sets the programmable gain amplifier for the channel on devices which have an internal amplifier. The device datasheet documents eight available gain values, chosen @@ -134,7 +134,7 @@ by setting a value of 0 through 7 into the correspondi register bits. This variable sets the value used for those bits when making a measurement on the given channel. -.It Va dev.ads1115...voltage +.It Va dev.ads111x...voltage Reading this variable causes the device to make a measurement on the corresponding input pin(s) and return the voltage in microvolts. .Pp @@ -215,16 +215,16 @@ based system, such as these values are configurable for .Nm : .Bl -tag -width indent -.It Va hint.ads1115..at +.It Va hint.ads111x..at The iicbus instance the .Nm instance is attached to. -.It Va hint.ads1115...gain_index +.It Va hint.ads111x...gain_index The amplifier gain, as described above for the sysctl variable -.Va dev.ads1115...gain_index . -.It Va hint.ads1115...rate_index +.Va dev.ads111x...gain_index . +.It Va hint.ads111x...rate_index The sample rate, as described above for the sysctl variable -.Va dev.ads1115...rate_index . +.Va dev.ads111x...rate_index . .El .Pp If no channels are configured, sysctl variables will be created From owner-svn-src-head@freebsd.org Tue Aug 13 04:54:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81CC4CB885; Tue, 13 Aug 2019 04:54:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4670jl2s7Lz4QCY; Tue, 13 Aug 2019 04:54:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45125A0F4; Tue, 13 Aug 2019 04:54:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7D4s3UA026157; Tue, 13 Aug 2019 04:54:03 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7D4s2VX026155; Tue, 13 Aug 2019 04:54:02 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201908130454.x7D4s2VX026155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Tue, 13 Aug 2019 04:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350972 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 350972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 04:54:03 -0000 Author: jeff Date: Tue Aug 13 04:54:02 2019 New Revision: 350972 URL: https://svnweb.freebsd.org/changeset/base/350972 Log: Move scheduler state into the per-cpu area where it can be allocated on the correct NUMA domain. Reviewed by: markj, gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19315 Modified: head/sys/kern/sched_ule.c head/sys/sys/pcpu.h Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Aug 13 03:49:53 2019 (r350971) +++ head/sys/kern/sched_ule.c Tue Aug 13 04:54:02 2019 (r350972) @@ -247,6 +247,7 @@ struct tdq { u_char tdq_ipipending; /* IPI pending. */ u_char tdq_idx; /* Current insert index. */ u_char tdq_ridx; /* Current removal index. */ + int tdq_id; /* cpuid. */ struct runq tdq_realtime; /* real-time run queue. */ struct runq tdq_timeshare; /* timeshare run queue. */ struct runq tdq_idle; /* Queue of IDLE threads. */ @@ -280,14 +281,14 @@ static int trysteal_limit = 2; /* * One thread queue per processor. */ -static struct tdq tdq_cpu[MAXCPU]; static struct tdq *balance_tdq; static int balance_ticks; +DPCPU_DEFINE_STATIC(struct tdq, tdq); DPCPU_DEFINE_STATIC(uint32_t, randomval); -#define TDQ_SELF() (&tdq_cpu[PCPU_GET(cpuid)]) -#define TDQ_CPU(x) (&tdq_cpu[(x)]) -#define TDQ_ID(x) ((int)((x) - tdq_cpu)) +#define TDQ_SELF() ((struct tdq *)PCPU_GET(sched)) +#define TDQ_CPU(x) (DPCPU_ID_PTR((x), tdq)) +#define TDQ_ID(x) ((x)->tdq_id) #else /* !SMP */ static struct tdq tdq_cpu; @@ -311,7 +312,7 @@ static void sched_pctcpu_update(struct td_sched *, int /* Operations on per processor queues */ static struct thread *tdq_choose(struct tdq *); -static void tdq_setup(struct tdq *); +static void tdq_setup(struct tdq *, int i); static void tdq_load_add(struct tdq *, struct thread *); static void tdq_load_rem(struct tdq *, struct thread *); static __inline void tdq_runq_add(struct tdq *, struct thread *, int); @@ -838,6 +839,7 @@ sched_highest(const struct cpu_group *cg, cpuset_t mas static void sched_balance_group(struct cpu_group *cg) { + struct tdq *tdq; cpuset_t hmask, lmask; int high, low, anylow; @@ -853,9 +855,9 @@ sched_balance_group(struct cpu_group *cg) if (CPU_EMPTY(&lmask)) break; anylow = 1; + tdq = TDQ_CPU(high); nextlow: - low = sched_lowest(cg, lmask, -1, - TDQ_CPU(high)->tdq_load - 1, high); + low = sched_lowest(cg, lmask, -1, tdq->tdq_load - 1, high); /* Stop if we looked well and found no less loaded CPU. */ if (anylow && low == -1) break; @@ -863,7 +865,7 @@ nextlow: if (low == -1) continue; /* Transfer thread from high to low. */ - if (sched_balance_pair(TDQ_CPU(high), TDQ_CPU(low))) { + if (sched_balance_pair(tdq, TDQ_CPU(low))) { /* CPU that got thread can no longer be a donor. */ CPU_CLR(low, &hmask); } else { @@ -1271,7 +1273,7 @@ sched_pickcpu(struct thread *td, int flags) curthread->td_intr_nesting_level && ts->ts_cpu != self) { SCHED_STAT_INC(pickcpu_intrbind); ts->ts_cpu = self; - if (TDQ_CPU(self)->tdq_lowpri > pri) { + if (TDQ_SELF()->tdq_lowpri > pri) { SCHED_STAT_INC(pickcpu_affinity); return (ts->ts_cpu); } @@ -1329,9 +1331,10 @@ sched_pickcpu(struct thread *td, int flags) /* * Compare the lowest loaded cpu to current cpu. */ - if (THREAD_CAN_SCHED(td, self) && TDQ_CPU(self)->tdq_lowpri > pri && - TDQ_CPU(cpu)->tdq_lowpri < PRI_MIN_IDLE && - TDQ_CPU(self)->tdq_load <= TDQ_CPU(cpu)->tdq_load + 1) { + tdq = TDQ_CPU(cpu); + if (THREAD_CAN_SCHED(td, self) && TDQ_SELF()->tdq_lowpri > pri && + tdq->tdq_lowpri < PRI_MIN_IDLE && + TDQ_SELF()->tdq_load <= tdq->tdq_load + 1) { SCHED_STAT_INC(pickcpu_local); cpu = self; } else @@ -1376,14 +1379,15 @@ tdq_choose(struct tdq *tdq) * Initialize a thread queue. */ static void -tdq_setup(struct tdq *tdq) +tdq_setup(struct tdq *tdq, int id) { if (bootverbose) - printf("ULE: setup cpu %d\n", TDQ_ID(tdq)); + printf("ULE: setup cpu %d\n", id); runq_init(&tdq->tdq_realtime); runq_init(&tdq->tdq_timeshare); runq_init(&tdq->tdq_idle); + tdq->tdq_id = id; snprintf(tdq->tdq_name, sizeof(tdq->tdq_name), "sched lock %d", (int)TDQ_ID(tdq)); mtx_init(&tdq->tdq_lock, tdq->tdq_name, "sched lock", @@ -1403,12 +1407,13 @@ sched_setup_smp(void) cpu_top = smp_topo(); CPU_FOREACH(i) { - tdq = TDQ_CPU(i); - tdq_setup(tdq); + tdq = DPCPU_ID_PTR(i, tdq); + tdq_setup(tdq, i); tdq->tdq_cg = smp_topo_find(cpu_top, i); if (tdq->tdq_cg == NULL) panic("Can't find cpu group for %d\n", i); } + PCPU_SET(sched, DPCPU_PTR(tdq)); balance_tdq = TDQ_SELF(); } #endif @@ -1422,12 +1427,12 @@ sched_setup(void *dummy) { struct tdq *tdq; - tdq = TDQ_SELF(); #ifdef SMP sched_setup_smp(); #else - tdq_setup(tdq); + tdq_setup(TDQ_SELF(), 0); #endif + tdq = TDQ_SELF(); /* Add thread0's load since it's running. */ TDQ_LOCK(tdq); @@ -2036,7 +2041,7 @@ sched_switch(struct thread *td, struct thread *newtd, KASSERT(newtd == NULL, ("sched_switch: Unsupported newtd argument")); cpuid = PCPU_GET(cpuid); - tdq = TDQ_CPU(cpuid); + tdq = TDQ_SELF(); ts = td_get_sched(td); mtx = td->td_lock; sched_pctcpu_update(ts, 1); @@ -2131,7 +2136,7 @@ sched_switch(struct thread *td, struct thread *newtd, * run queue lock. */ cpuid = PCPU_GET(cpuid); - tdq = TDQ_CPU(cpuid); + tdq = TDQ_SELF(); lock_profile_obtain_lock_success( &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__); @@ -2871,14 +2876,18 @@ sched_throw(struct thread *td) struct thread *newtd; struct tdq *tdq; - tdq = TDQ_SELF(); if (td == NULL) { +#ifdef SMP + PCPU_SET(sched, DPCPU_PTR(tdq)); +#endif /* Correct spinlock nesting and acquire the correct lock. */ + tdq = TDQ_SELF(); TDQ_LOCK(tdq); spinlock_exit(); PCPU_SET(switchtime, cpu_ticks()); PCPU_SET(switchticks, ticks); } else { + tdq = TDQ_SELF(); MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); tdq_load_rem(tdq, td); lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); @@ -2906,7 +2915,7 @@ sched_fork_exit(struct thread *td) * non-nested critical section with the scheduler lock held. */ cpuid = PCPU_GET(cpuid); - tdq = TDQ_CPU(cpuid); + tdq = TDQ_SELF(); if (TD_IS_IDLETHREAD(td)) td->td_lock = TDQ_LOCKPTR(tdq); MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Aug 13 03:49:53 2019 (r350971) +++ head/sys/sys/pcpu.h Tue Aug 13 04:54:02 2019 (r350972) @@ -180,6 +180,7 @@ struct pcpu { struct thread *pc_fpcurthread; /* Fp state owner */ struct thread *pc_deadthread; /* Zombie thread or NULL */ struct pcb *pc_curpcb; /* Current pcb */ + void *pc_sched; /* Scheduler state */ uint64_t pc_switchtime; /* cpu_ticks() at last csw */ int pc_switchticks; /* `ticks' at last csw */ u_int pc_cpuid; /* This cpu number */ From owner-svn-src-head@freebsd.org Tue Aug 13 12:41:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 698E3AE582; Tue, 13 Aug 2019 12:41:16 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467C4r2CW2z3JJM; Tue, 13 Aug 2019 12:41:16 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D9BAF6A6; Tue, 13 Aug 2019 12:41:16 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DCfFUI098886; Tue, 13 Aug 2019 12:41:15 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DCfFVB098885; Tue, 13 Aug 2019 12:41:15 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201908131241.x7DCfFVB098885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 13 Aug 2019 12:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350973 - head/sys/netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet/tcp_stacks X-SVN-Commit-Revision: 350973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 12:41:16 -0000 Author: rrs Date: Tue Aug 13 12:41:15 2019 New Revision: 350973 URL: https://svnweb.freebsd.org/changeset/base/350973 Log: Place back in the dependency on HPTS via module depends versus a fatal error in compiling. This was taken out by mistake when I mis-merged from the 18q22p2 sources of rack in NF. Opps. Reported by: sbruno Modified: head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Tue Aug 13 04:54:02 2019 (r350972) +++ head/sys/netinet/tcp_stacks/rack.c Tue Aug 13 12:41:15 2019 (r350973) @@ -128,10 +128,6 @@ uma_zone_t rack_pcb_zone; struct sysctl_ctx_list rack_sysctl_ctx; struct sysctl_oid *rack_sysctl_root; -#ifndef TCPHPTS -#error "fatal error missing option TCPHSTS in the build" -#endif - #define CUM_ACKED 1 #define SACKED 2 @@ -9212,3 +9208,4 @@ static moduledata_t tcp_rack = { MODULE_VERSION(MODNAME, 1); DECLARE_MODULE(MODNAME, tcp_rack, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY); +MODULE_DEPEND(MODNAME, tcphpts, 1, 1, 1); From owner-svn-src-head@freebsd.org Tue Aug 13 12:47:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57C2DAE6F1; Tue, 13 Aug 2019 12:47:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467CDV1bMgz3Jl2; Tue, 13 Aug 2019 12:47:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 186DCF85C; Tue, 13 Aug 2019 12:47:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DClrlE002660; Tue, 13 Aug 2019 12:47:53 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DClr33002659; Tue, 13 Aug 2019 12:47:53 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201908131247.x7DClr33002659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Aug 2019 12:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350974 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 350974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 12:47:54 -0000 Author: ae Date: Tue Aug 13 12:47:53 2019 New Revision: 350974 URL: https://svnweb.freebsd.org/changeset/base/350974 Log: Save ip_ttl value and restore it after checksum calculation. Since ipvoly is used for checksum calculation, part of original IP header is zeroed. This part includes ip_ttl field, that can be used later in IP_MINTTL socket option handling. PR: 239799 MFC after: 1 week Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Aug 13 12:41:15 2019 (r350973) +++ head/sys/netinet/tcp_input.c Tue Aug 13 12:47:53 2019 (r350974) @@ -554,6 +554,7 @@ tcp_input(struct mbuf **mp, int *offp, int proto) int optlen = 0; #ifdef INET int len; + uint8_t ipttl; #endif int tlen = 0, off; int drop_hdrlen; @@ -676,6 +677,7 @@ tcp_input(struct mbuf **mp, int *offp, int proto) * Checksum extended TCP header and data. */ len = off0 + tlen; + ipttl = ip->ip_ttl; bzero(ipov->ih_x1, sizeof(ipov->ih_x1)); ipov->ih_len = htons(tlen); th->th_sum = in_cksum(m, len); @@ -684,6 +686,7 @@ tcp_input(struct mbuf **mp, int *offp, int proto) /* Reset TOS bits */ ip->ip_tos = iptos; /* Re-initialization for later version check */ + ip->ip_ttl = ipttl; ip->ip_v = IPVERSION; ip->ip_hl = off0 >> 2; } From owner-svn-src-head@freebsd.org Tue Aug 13 13:28:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1704AF412; Tue, 13 Aug 2019 13:28:12 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467D7069kwz3LVP; Tue, 13 Aug 2019 13:28:12 +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 B72C818039; Tue, 13 Aug 2019 13:28:12 +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 x7DDSCJN026408; Tue, 13 Aug 2019 13:28:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DDSCOm026406; Tue, 13 Aug 2019 13:28:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131328.x7DDSCOm026406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 13:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350975 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 13:28:13 -0000 Author: imp Date: Tue Aug 13 13:28:12 2019 New Revision: 350975 URL: https://svnweb.freebsd.org/changeset/base/350975 Log: ed(4) has been removed from the tree, but these were forgotten in r347911. Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Aug 13 12:47:53 2019 (r350974) +++ head/sys/conf/files.amd64 Tue Aug 13 13:28:12 2019 (r350975) @@ -236,12 +236,6 @@ dev/bxe/57712_init_values.c optional bxe pci dev/coretemp/coretemp.c optional coretemp dev/cpuctl/cpuctl.c optional cpuctl dev/dpms/dpms.c optional dpms -# There are no systems with isa slots, so all ed isa entries should go.. -dev/ed/if_ed_3c503.c optional ed isa ed_3c503 -dev/ed/if_ed_isa.c optional ed isa -dev/ed/if_ed_wd80x3.c optional ed isa -dev/ed/if_ed_hpp.c optional ed isa ed_hpp -dev/ed/if_ed_sic.c optional ed isa ed_sic dev/fb/fb.c optional fb | vga dev/fb/s3_pci.c optional s3pci dev/fb/vesa.c optional vga vesa Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Aug 13 12:47:53 2019 (r350974) +++ head/sys/conf/files.i386 Tue Aug 13 13:28:12 2019 (r350975) @@ -198,11 +198,6 @@ dev/cx/csigma.c optional cx dev/cx/cxddk.c optional cx dev/cx/if_cx.c optional cx dev/dpms/dpms.c optional dpms -dev/ed/if_ed_3c503.c optional ed isa ed_3c503 -dev/ed/if_ed_isa.c optional ed isa -dev/ed/if_ed_wd80x3.c optional ed isa -dev/ed/if_ed_hpp.c optional ed isa ed_hpp -dev/ed/if_ed_sic.c optional ed isa ed_sic dev/fb/fb.c optional fb | vga dev/fb/s3_pci.c optional s3pci dev/fb/vesa.c optional vga vesa From owner-svn-src-head@freebsd.org Tue Aug 13 13:41:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3E2FAFDAF; Tue, 13 Aug 2019 13:41:47 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467DQg6ByXz3MXS; Tue, 13 Aug 2019 13:41:47 +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 B748618288; Tue, 13 Aug 2019 13:41:47 +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 x7DDflof038338; Tue, 13 Aug 2019 13:41:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DDfl84038061; Tue, 13 Aug 2019 13:41:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131341.x7DDfl84038061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 13:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350976 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 13:41:48 -0000 Author: imp Date: Tue Aug 13 13:41:46 2019 New Revision: 350976 URL: https://svnweb.freebsd.org/changeset/base/350976 Log: nvme has been moved to 'files' so shouldn't be here anymore. It works on powerpc64 and arm64 these days as well as amd64/i386. Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Aug 13 13:28:12 2019 (r350975) +++ head/sys/conf/files.amd64 Tue Aug 13 13:41:46 2019 (r350976) @@ -346,17 +346,6 @@ dev/ntb/ntb_if.m optional ntb | ntb_transport | if_nt dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw -dev/nvd/nvd.c optional nvd nvme -dev/nvme/nvme.c optional nvme -dev/nvme/nvme_ctrlr.c optional nvme -dev/nvme/nvme_ctrlr_cmd.c optional nvme -dev/nvme/nvme_ns.c optional nvme -dev/nvme/nvme_ns_cmd.c optional nvme -dev/nvme/nvme_qpair.c optional nvme -dev/nvme/nvme_sim.c optional nvme scbus -dev/nvme/nvme_sysctl.c optional nvme -dev/nvme/nvme_test.c optional nvme -dev/nvme/nvme_util.c optional nvme dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional rdrand_rng !random_loadable dev/random/nehemiah.c optional padlock_rng !random_loadable Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Aug 13 13:28:12 2019 (r350975) +++ head/sys/conf/files.i386 Tue Aug 13 13:41:46 2019 (r350976) @@ -279,17 +279,6 @@ dev/ntb/ntb_if.m optional ntb | ntb_transport | if_nt dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw -dev/nvd/nvd.c optional nvd nvme -dev/nvme/nvme.c optional nvme -dev/nvme/nvme_ctrlr.c optional nvme -dev/nvme/nvme_ctrlr_cmd.c optional nvme -dev/nvme/nvme_ns.c optional nvme -dev/nvme/nvme_ns_cmd.c optional nvme -dev/nvme/nvme_qpair.c optional nvme -dev/nvme/nvme_sysctl.c optional nvme -dev/nvme/nvme_test.c optional nvme -dev/nvme/nvme_util.c optional nvme -dev/nvram/nvram.c optional nvram isa dev/ofw/ofwpci.c optional fdt pci dev/pcf/pcf_isa.c optional pcf dev/random/ivy.c optional rdrand_rng !random_loadable From owner-svn-src-head@freebsd.org Tue Aug 13 14:47:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86E48B16BF; Tue, 13 Aug 2019 14:47:25 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467FtP31P7z3Qvk; Tue, 13 Aug 2019 14:47:25 +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 4A2C218F05; Tue, 13 Aug 2019 14:47:25 +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 x7DElPNY075027; Tue, 13 Aug 2019 14:47:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DElPTU075026; Tue, 13 Aug 2019 14:47:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908131447.x7DElPTU075026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Aug 2019 14:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350979 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 350979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 14:47:25 -0000 Author: emaste Date: Tue Aug 13 14:47:24 2019 New Revision: 350979 URL: https://svnweb.freebsd.org/changeset/base/350979 Log: Remove rsh/rlogin references from security man page More extensive changes to this page are certainly needed, but at least remove references to binaries that no longer exist. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/security.7 Modified: head/share/man/man7/security.7 ============================================================================== --- head/share/man/man7/security.7 Tue Aug 13 13:48:44 2019 (r350978) +++ head/share/man/man7/security.7 Tue Aug 13 14:47:24 2019 (r350979) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2019 +.Dd August 13, 2019 .Dt SECURITY 7 .Os .Sh NAME @@ -99,9 +99,7 @@ pipe. A user account compromise is even more common than a DoS attack. Many sysadmins still run standard -.Xr telnetd 8 , -.Xr rlogind 8 , -.Xr rshd 8 , +.Xr telnetd 8 and .Xr ftpd 8 servers on their machines. @@ -186,8 +184,6 @@ in the file so that direct root logins via .Xr telnet 1 -or -.Xr rlogin 1 are disallowed. If using other login services such as @@ -342,10 +338,7 @@ virtually every server ever run as root, including bas If you are running a machine through which people only log in via .Xr sshd 8 and never log in via -.Xr telnetd 8 , -.Xr rshd 8 , -or -.Xr rlogind 8 , +.Xr telnetd 8 then turn off those services! .Pp .Fx @@ -378,7 +371,7 @@ occur through them. The other big potential root hole in a system are the SUID-root and SGID binaries installed on the system. Most of these binaries, such as -.Xr rlogin 1 , +.Xr su 1 , reside in .Pa /bin , /sbin , /usr/bin , or @@ -905,8 +898,6 @@ if you intend to use them. Kerberos5 is an excellent authentication protocol but the kerberized .Xr telnet 1 -and -.Xr rlogin 1 suck rocks. There are bugs that make them unsuitable for dealing with binary streams. Also, by default From owner-svn-src-head@freebsd.org Tue Aug 13 14:51:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9545B191A; Tue, 13 Aug 2019 14:51:16 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Fyr5wj9z3RM4; Tue, 13 Aug 2019 14:51:16 +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 AD38B19068; Tue, 13 Aug 2019 14:51:16 +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 x7DEpGNa077644; Tue, 13 Aug 2019 14:51:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DEpG0D077642; Tue, 13 Aug 2019 14:51:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908131451.x7DEpG0D077642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Aug 2019 14:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350980 - head/tools/build/options X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build/options X-SVN-Commit-Revision: 350980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 14:51:17 -0000 Author: emaste Date: Tue Aug 13 14:51:16 2019 New Revision: 350980 URL: https://svnweb.freebsd.org/changeset/base/350980 Log: Remove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT rcmds were removed in r324351 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Modified: head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT ============================================================================== --- head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Tue Aug 13 14:47:24 2019 (r350979) +++ head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Tue Aug 13 14:51:16 2019 (r350980) @@ -4,7 +4,5 @@ Set to build some programs without support, like .Xr fingerd 8 , .Xr ftpd 8 , -.Xr rlogind 8 , -.Xr rshd 8 , and .Xr sshd 8 . From owner-svn-src-head@freebsd.org Tue Aug 13 14:57:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66A4EB1BBE; Tue, 13 Aug 2019 14:57:05 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467G5Y24Gbz3wtw; Tue, 13 Aug 2019 14:57:05 +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 245C0190DF; Tue, 13 Aug 2019 14:57:05 +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 x7DEv4Xw081317; Tue, 13 Aug 2019 14:57:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DEv4cx081316; Tue, 13 Aug 2019 14:57:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908131457.x7DEv4cx081316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Aug 2019 14:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350981 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 350981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 14:57:05 -0000 Author: emaste Date: Tue Aug 13 14:57:04 2019 New Revision: 350981 URL: https://svnweb.freebsd.org/changeset/base/350981 Log: Regen src.conf.5 after r350980 (remove rsh/rlogin references) Also pick up changes to LLVM_TARGET_RISCV, NAND, NVME, OPENM Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Aug 13 14:51:16 2019 (r350980) +++ head/share/man/man5/src.conf.5 Tue Aug 13 14:57:04 2019 (r350981) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 29, 2019 +.Dd August 13, 2019 .Dt SRC.CONF 5 .Os .Sh NAME @@ -233,8 +233,6 @@ Set to build some programs without support, like .Xr fingerd 8 , .Xr ftpd 8 , -.Xr rlogind 8 , -.Xr rshd 8 , and .Xr sshd 8 . .It Va WITHOUT_BLUETOOTH @@ -399,10 +397,6 @@ is set explicitly) (unless .Va WITH_LLVM_TARGET_POWERPC is set explicitly) -.It Va WITHOUT_LLVM_TARGET_RISCV -(unless -.Va WITH_LLVM_TARGET_RISCV -is set explicitly) .It Va WITHOUT_LLVM_TARGET_SPARC (unless .Va WITH_LLVM_TARGET_SPARC @@ -1214,20 +1208,11 @@ option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. -.It Va WITHOUT_LLVM_TARGET_RISCV -Set to not build LLVM target support for RISC-V. -The -.Va LLVM_TARGET_ALL -option should be used rather than this in most cases. -.Pp -This is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, and sparc/sparc64. .It Va WITH_LLVM_TARGET_RISCV Set to build LLVM target support for RISC-V. The .Va LLVM_TARGET_ALL option should be used rather than this in most cases. -.Pp .It Va WITHOUT_LLVM_TARGET_SPARC Set to not build LLVM target support for SPARC. The @@ -1469,8 +1454,6 @@ Set to build .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_NAND -Set to build the NAND Flash components. .It Va WITHOUT_NDIS Set to not build programs and libraries related to NDIS emulation support. @@ -1535,13 +1518,13 @@ and related programs. Set to not build nvme related tools and kernel modules. .Pp This is a default setting on -arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. .It Va WITH_NVME Set to build nvme related tools and kernel modules. .Pp This is a default setting on -amd64/amd64, i386/i386 and powerpc/powerpc64. +amd64/amd64, arm64/aarch64, i386/i386 and powerpc/powerpc64. .It Va WITH_OFED Set to build the .Dq "OpenFabrics Enterprise Distribution" @@ -1556,12 +1539,12 @@ Enable building openldap support for kerberos. Set to not build LLVM's OpenMP runtime. .Pp This is a default setting on -arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. +arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64. .It Va WITH_OPENMP Set to build LLVM's OpenMP runtime. .Pp This is a default setting on -amd64/amd64. +amd64/amd64 and i386/i386. .It Va WITHOUT_OPENSSH Set to not build OpenSSH. .It Va WITHOUT_OPENSSL @@ -1674,10 +1657,10 @@ by proxy. .It Va WITHOUT_RBOOTD Set to not build or install .Xr rbootd 8 . -.It Va WITHOUT_REPRODUCIBLE_BUILD -Set to include build metadata (such as the build time, user, and host) -in the kernel, boot loaders, and uname output. -Successive builds will not be bit-for-bit identical. +.It Va WITH_REPRODUCIBLE_BUILD +Set to exclude build metadata (such as the build time, user, or host) +from the kernel, boot loaders, and uname output, so that builds produce +bit-for-bit identical output. .It Va WITHOUT_RESCUE Set to not build .Xr rescue 8 . From owner-svn-src-head@freebsd.org Tue Aug 13 15:16:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F873B2462; Tue, 13 Aug 2019 15:16:43 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467GXC2Kv4z3y0t; Tue, 13 Aug 2019 15:16:43 +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 2D62E19477; Tue, 13 Aug 2019 15:16:43 +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 x7DFGgMq093396; Tue, 13 Aug 2019 15:16:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFGgZJ093394; Tue, 13 Aug 2019 15:16:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131516.x7DFGgZJ093394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 15:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350982 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:16:43 -0000 Author: imp Date: Tue Aug 13 15:16:42 2019 New Revision: 350982 URL: https://svnweb.freebsd.org/changeset/base/350982 Log: fe(4) driver has been removed from the tree in r347914. Remove stray reference. Modified: head/sys/conf/files.i386 Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Aug 13 14:57:04 2019 (r350981) +++ head/sys/conf/files.i386 Tue Aug 13 15:16:42 2019 (r350982) @@ -202,7 +202,6 @@ dev/fb/fb.c optional fb | vga dev/fb/s3_pci.c optional s3pci dev/fb/vesa.c optional vga vesa dev/fb/vga.c optional vga -dev/fe/if_fe_isa.c optional fe isa dev/glxiic/glxiic.c optional glxiic dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb From owner-svn-src-head@freebsd.org Tue Aug 13 15:23:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10B3FB2821; Tue, 13 Aug 2019 15:23:15 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Ggk6gwcz3yV1; Tue, 13 Aug 2019 15:23:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6DC31964D; Tue, 13 Aug 2019 15:23:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DFNEGh099192; Tue, 13 Aug 2019 15:23:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFNEwQ099191; Tue, 13 Aug 2019 15:23:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908131523.x7DFNEwQ099191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Aug 2019 15:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350983 - head/usr.sbin/crunch/examples X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/crunch/examples X-SVN-Commit-Revision: 350983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:23:15 -0000 Author: emaste Date: Tue Aug 13 15:23:14 2019 New Revision: 350983 URL: https://svnweb.freebsd.org/changeset/base/350983 Log: crunch: remove rsh and rlogin from example config file rcmds removed in r324351. Historical references in the README are maintained. There's a paragraph describing a "980K crunched 'fixit'" that references rsh and rlogin. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/crunch/examples/fixit.conf Modified: head/usr.sbin/crunch/examples/fixit.conf ============================================================================== --- head/usr.sbin/crunch/examples/fixit.conf Tue Aug 13 15:16:42 2019 (r350982) +++ head/usr.sbin/crunch/examples/fixit.conf Tue Aug 13 15:23:14 2019 (r350983) @@ -29,7 +29,7 @@ ln restore rrestore # /usr/bin stuff -progs ftp rsh sed telnet rlogin common find +progs ftp sed telnet common find ln common vi ln common view ln common ex From owner-svn-src-head@freebsd.org Tue Aug 13 15:28:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18868B2A8B; Tue, 13 Aug 2019 15:28:12 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467GnR6rtvz3ypY; Tue, 13 Aug 2019 15:28:11 +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 CCCAD1965A; Tue, 13 Aug 2019 15:28:11 +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 x7DFSBLO099497; Tue, 13 Aug 2019 15:28:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFSBJt099496; Tue, 13 Aug 2019 15:28:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131528.x7DFSBJt099496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 15:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350984 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:28:12 -0000 Author: imp Date: Tue Aug 13 15:28:11 2019 New Revision: 350984 URL: https://svnweb.freebsd.org/changeset/base/350984 Log: nsp(4) was removed in r339571. Remove stray reference. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Aug 13 15:23:14 2019 (r350983) +++ head/sys/conf/files Tue Aug 13 15:28:11 2019 (r350984) @@ -2476,8 +2476,6 @@ dev/netmap/netmap_vale.c optional netmap dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge dev/nmdm/nmdm.c optional nmdm -dev/nsp/nsp.c optional nsp -dev/nsp/nsp_pccard.c optional nsp pccard dev/null/null.c standard dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme From owner-svn-src-head@freebsd.org Tue Aug 13 15:28:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23CC3B2ACC; Tue, 13 Aug 2019 15:28:19 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467GnZ5bs5z3ywd; Tue, 13 Aug 2019 15:28:18 +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 A25A21965B; Tue, 13 Aug 2019 15:28:18 +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 x7DFSI9V099551; Tue, 13 Aug 2019 15:28:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFSIj7099550; Tue, 13 Aug 2019 15:28:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131528.x7DFSIj7099550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 15:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350985 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:28:19 -0000 Author: imp Date: Tue Aug 13 15:28:18 2019 New Revision: 350985 URL: https://svnweb.freebsd.org/changeset/base/350985 Log: vx(4) was removed in r347921. Remove stray reference. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Aug 13 15:28:11 2019 (r350984) +++ head/sys/conf/files Tue Aug 13 15:28:18 2019 (r350985) @@ -3404,8 +3404,6 @@ dev/vt/vt_cpulogos.c optional vt splash dev/vt/vt_font.c optional vt dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci -dev/vx/if_vx.c optional vx -dev/vx/if_vx_pci.c optional vx pci dev/watchdog/watchdog.c standard dev/wi/if_wi.c optional wi dev/wi/if_wi_pccard.c optional wi pccard From owner-svn-src-head@freebsd.org Tue Aug 13 15:28:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 726B8B2B0C; Tue, 13 Aug 2019 15:28:23 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Gng2BPZz4009; Tue, 13 Aug 2019 15:28:23 +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 2DDB01965C; Tue, 13 Aug 2019 15:28:23 +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 x7DFSN5Z099605; Tue, 13 Aug 2019 15:28:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFSNV0099604; Tue, 13 Aug 2019 15:28:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131528.x7DFSNV0099604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 15:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350986 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:28:23 -0000 Author: imp Date: Tue Aug 13 15:28:22 2019 New Revision: 350986 URL: https://svnweb.freebsd.org/changeset/base/350986 Log: Flowtables were removed in r321618, remove stray reference here. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Aug 13 15:28:18 2019 (r350985) +++ head/sys/conf/files Tue Aug 13 15:28:22 2019 (r350986) @@ -4045,7 +4045,6 @@ net/bpf_jitter.c optional bpf_jitter net/bpf_filter.c optional bpf | netgraph_bpf net/bpf_zerocopy.c optional bpf net/bridgestp.c optional bridge | if_bridge -net/flowtable.c optional flowtable inet | flowtable inet6 net/ieee8023ad_lacp.c optional lagg net/if.c standard net/if_bridge.c optional bridge inet | if_bridge inet From owner-svn-src-head@freebsd.org Tue Aug 13 15:30:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E3CBB2CAD; Tue, 13 Aug 2019 15:30:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Gr63DzYz40NB; Tue, 13 Aug 2019 15:30:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50EF319663; Tue, 13 Aug 2019 15:30:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DFUUk4099995; Tue, 13 Aug 2019 15:30:30 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFUUHP099994; Tue, 13 Aug 2019 15:30:30 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131530.x7DFUUHP099994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 15:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350987 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 350987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:30:30 -0000 Author: asomers Date: Tue Aug 13 15:30:29 2019 New Revision: 350987 URL: https://svnweb.freebsd.org/changeset/base/350987 Log: ping6: Fix data type of a variable for a packet sequence number Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21218 Modified: head/sbin/ping6/ping6.c Directory Properties: head/ (props changed) Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Tue Aug 13 15:28:22 2019 (r350986) +++ head/sbin/ping6/ping6.c Tue Aug 13 15:30:29 2019 (r350987) @@ -1304,7 +1304,7 @@ pinger(void) struct iovec iov[2]; int i, cc; struct icmp6_nodeinfo *nip; - int seq; + uint16_t seq; if (npackets && ntransmitted >= npackets) return(-1); /* no more transmission */ From owner-svn-src-head@freebsd.org Tue Aug 13 15:38:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53414B310A; Tue, 13 Aug 2019 15:38:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467H0t1VLDz40xX; Tue, 13 Aug 2019 15:38:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14E6B19847; Tue, 13 Aug 2019 15:38:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DFc5rV005888; Tue, 13 Aug 2019 15:38:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFc5rv005887; Tue, 13 Aug 2019 15:38:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201908131538.x7DFc5rv005887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 13 Aug 2019 15:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350988 - head/sys/dev/gpio X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/gpio X-SVN-Commit-Revision: 350988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:38:06 -0000 Author: ian Date: Tue Aug 13 15:38:05 2019 New Revision: 350988 URL: https://svnweb.freebsd.org/changeset/base/350988 Log: Add PNP_INFO to the gpiopps driver. Modified: head/sys/dev/gpio/gpiopps.c Modified: head/sys/dev/gpio/gpiopps.c ============================================================================== --- head/sys/dev/gpio/gpiopps.c Tue Aug 13 15:30:29 2019 (r350987) +++ head/sys/dev/gpio/gpiopps.c Tue Aug 13 15:38:05 2019 (r350988) @@ -47,6 +47,7 @@ static struct ofw_compat_data compat_data[] = { {"pps-gpio", 1}, {NULL, 0} }; +SIMPLEBUS_PNP_INFO(compat_data); #endif /* FDT */ static devclass_t pps_devclass; From owner-svn-src-head@freebsd.org Tue Aug 13 15:41:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80504B326B; Tue, 13 Aug 2019 15:41:37 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467H4x2rbDz41Mp; Tue, 13 Aug 2019 15:41:37 +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 4359C198A2; Tue, 13 Aug 2019 15:41:37 +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 x7DFfbaE008700; Tue, 13 Aug 2019 15:41:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFfa4X008483; Tue, 13 Aug 2019 15:41:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908131541.x7DFfa4X008483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Aug 2019 15:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350989 - in head/share/man: man4 man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/share/man: man4 man5 X-SVN-Commit-Revision: 350989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:41:37 -0000 Author: emaste Date: Tue Aug 13 15:41:36 2019 New Revision: 350989 URL: https://svnweb.freebsd.org/changeset/base/350989 Log: Remove some more leftover rlogin man page xrefs rcmds were removed in r32435 and these three man pages can trivially drop the references. There's still a reference in pts.4 because it describes a mode (TIOCPKT_NOSTOP), and only lists rlogin/rlogind as examples of programs that use that mode. To update later. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/termios.4 head/share/man/man4/tty.4 head/share/man/man5/hosts.equiv.5 Modified: head/share/man/man4/termios.4 ============================================================================== --- head/share/man/man4/termios.4 Tue Aug 13 15:38:05 2019 (r350988) +++ head/share/man/man4/termios.4 Tue Aug 13 15:41:36 2019 (r350989) @@ -58,9 +58,7 @@ a connection being present. In practice, applications seldom open these files; they are opened by special programs, such as -.Xr getty 8 -or -.Xr rlogind 8 , +.Xr getty 8 , and become an application's standard input, output, and error files. .Ss Job Control in a Nutshell Modified: head/share/man/man4/tty.4 ============================================================================== --- head/share/man/man4/tty.4 Tue Aug 13 15:38:05 2019 (r350988) +++ head/share/man/man4/tty.4 Tue Aug 13 15:41:36 2019 (r350989) @@ -54,8 +54,6 @@ These special terminal devices are called .Em ptys and provide the mechanism necessary to give users the same interface to the system when logging in over a network (using -.Xr rlogin 1 , -or .Xr telnet 1 for example). Even in these cases the details of how the terminal Modified: head/share/man/man5/hosts.equiv.5 ============================================================================== --- head/share/man/man5/hosts.equiv.5 Tue Aug 13 15:38:05 2019 (r350988) +++ head/share/man/man5/hosts.equiv.5 Tue Aug 13 15:41:36 2019 (r350989) @@ -127,8 +127,6 @@ except users from netgroup .Dq dau . .Sh SEE ALSO .Xr rcp 1 , -.Xr rlogin 1 , -.Xr rsh 1 , .Xr gethostbyname 3 , .Xr inet 3 , .Xr innetgr 3 , From owner-svn-src-head@freebsd.org Tue Aug 13 15:49:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5713FB34E7; Tue, 13 Aug 2019 15:49:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467HGR1w7Zz41dt; Tue, 13 Aug 2019 15:49:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22E1419A1A; Tue, 13 Aug 2019 15:49:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DFnpeq012391; Tue, 13 Aug 2019 15:49:51 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFnfRB012343; Tue, 13 Aug 2019 15:49:41 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131549.x7DFnfRB012343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 15:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350990 - head/tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/fusefs X-SVN-Commit-Revision: 350990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:49:51 -0000 Author: asomers Date: Tue Aug 13 15:49:40 2019 New Revision: 350990 URL: https://svnweb.freebsd.org/changeset/base/350990 Log: fusefs: add SVN Keywords to the test files Reported by: SVN pre-commit hooks MFC after: 15 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/fs/fusefs/access.cc head/tests/sys/fs/fusefs/allow_other.cc head/tests/sys/fs/fusefs/bmap.cc head/tests/sys/fs/fusefs/create.cc head/tests/sys/fs/fusefs/default_permissions.cc head/tests/sys/fs/fusefs/default_permissions_privileged.cc head/tests/sys/fs/fusefs/destroy.cc head/tests/sys/fs/fusefs/dev_fuse_poll.cc head/tests/sys/fs/fusefs/fifo.cc head/tests/sys/fs/fusefs/flush.cc head/tests/sys/fs/fusefs/forget.cc head/tests/sys/fs/fusefs/fsync.cc head/tests/sys/fs/fusefs/fsyncdir.cc head/tests/sys/fs/fusefs/getattr.cc head/tests/sys/fs/fusefs/interrupt.cc head/tests/sys/fs/fusefs/io.cc head/tests/sys/fs/fusefs/link.cc head/tests/sys/fs/fusefs/locks.cc head/tests/sys/fs/fusefs/lookup.cc head/tests/sys/fs/fusefs/mkdir.cc head/tests/sys/fs/fusefs/mknod.cc head/tests/sys/fs/fusefs/mockfs.cc head/tests/sys/fs/fusefs/mockfs.hh (contents, props changed) head/tests/sys/fs/fusefs/mount.cc head/tests/sys/fs/fusefs/nfs.cc head/tests/sys/fs/fusefs/notify.cc head/tests/sys/fs/fusefs/open.cc head/tests/sys/fs/fusefs/opendir.cc head/tests/sys/fs/fusefs/read.cc head/tests/sys/fs/fusefs/readdir.cc head/tests/sys/fs/fusefs/readlink.cc head/tests/sys/fs/fusefs/release.cc head/tests/sys/fs/fusefs/releasedir.cc head/tests/sys/fs/fusefs/rename.cc head/tests/sys/fs/fusefs/rmdir.cc head/tests/sys/fs/fusefs/setattr.cc head/tests/sys/fs/fusefs/statfs.cc head/tests/sys/fs/fusefs/symlink.cc head/tests/sys/fs/fusefs/unlink.cc head/tests/sys/fs/fusefs/utils.cc head/tests/sys/fs/fusefs/utils.hh (contents, props changed) head/tests/sys/fs/fusefs/write.cc head/tests/sys/fs/fusefs/xattr.cc Modified: head/tests/sys/fs/fusefs/access.cc ============================================================================== --- head/tests/sys/fs/fusefs/access.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/access.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/allow_other.cc ============================================================================== --- head/tests/sys/fs/fusefs/allow_other.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/allow_other.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* Modified: head/tests/sys/fs/fusefs/bmap.cc ============================================================================== --- head/tests/sys/fs/fusefs/bmap.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/bmap.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/create.cc ============================================================================== --- head/tests/sys/fs/fusefs/create.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/create.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/default_permissions.cc ============================================================================== --- head/tests/sys/fs/fusefs/default_permissions.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/default_permissions.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* Modified: head/tests/sys/fs/fusefs/default_permissions_privileged.cc ============================================================================== --- head/tests/sys/fs/fusefs/default_permissions_privileged.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/default_permissions_privileged.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* Modified: head/tests/sys/fs/fusefs/destroy.cc ============================================================================== --- head/tests/sys/fs/fusefs/destroy.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/destroy.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/dev_fuse_poll.cc ============================================================================== --- head/tests/sys/fs/fusefs/dev_fuse_poll.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/dev_fuse_poll.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* Modified: head/tests/sys/fs/fusefs/fifo.cc ============================================================================== --- head/tests/sys/fs/fusefs/fifo.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/fifo.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/flush.cc ============================================================================== --- head/tests/sys/fs/fusefs/flush.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/flush.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/forget.cc ============================================================================== --- head/tests/sys/fs/fusefs/forget.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/forget.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/fsync.cc ============================================================================== --- head/tests/sys/fs/fusefs/fsync.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/fsync.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/fsyncdir.cc ============================================================================== --- head/tests/sys/fs/fusefs/fsyncdir.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/fsyncdir.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/getattr.cc ============================================================================== --- head/tests/sys/fs/fusefs/getattr.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/getattr.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/interrupt.cc ============================================================================== --- head/tests/sys/fs/fusefs/interrupt.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/interrupt.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/io.cc ============================================================================== --- head/tests/sys/fs/fusefs/io.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/io.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/link.cc ============================================================================== --- head/tests/sys/fs/fusefs/link.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/link.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/locks.cc ============================================================================== --- head/tests/sys/fs/fusefs/locks.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/locks.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/lookup.cc ============================================================================== --- head/tests/sys/fs/fusefs/lookup.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/lookup.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/mkdir.cc ============================================================================== --- head/tests/sys/fs/fusefs/mkdir.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/mkdir.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/mknod.cc ============================================================================== --- head/tests/sys/fs/fusefs/mknod.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/mknod.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/mockfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/mockfs.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/mockfs.hh ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.hh Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/mockfs.hh Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/mount.cc ============================================================================== --- head/tests/sys/fs/fusefs/mount.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/mount.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/nfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/nfs.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/nfs.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* This file tests functionality needed by NFS servers */ Modified: head/tests/sys/fs/fusefs/notify.cc ============================================================================== --- head/tests/sys/fs/fusefs/notify.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/notify.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/open.cc ============================================================================== --- head/tests/sys/fs/fusefs/open.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/open.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/opendir.cc ============================================================================== --- head/tests/sys/fs/fusefs/opendir.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/opendir.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/read.cc ============================================================================== --- head/tests/sys/fs/fusefs/read.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/read.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/readdir.cc ============================================================================== --- head/tests/sys/fs/fusefs/readdir.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/readdir.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/readlink.cc ============================================================================== --- head/tests/sys/fs/fusefs/readlink.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/readlink.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/release.cc ============================================================================== --- head/tests/sys/fs/fusefs/release.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/release.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/releasedir.cc ============================================================================== --- head/tests/sys/fs/fusefs/releasedir.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/releasedir.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/rename.cc ============================================================================== --- head/tests/sys/fs/fusefs/rename.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/rename.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/rmdir.cc ============================================================================== --- head/tests/sys/fs/fusefs/rmdir.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/rmdir.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/setattr.cc ============================================================================== --- head/tests/sys/fs/fusefs/setattr.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/setattr.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/statfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/statfs.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/statfs.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/symlink.cc ============================================================================== --- head/tests/sys/fs/fusefs/symlink.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/symlink.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/unlink.cc ============================================================================== --- head/tests/sys/fs/fusefs/unlink.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/unlink.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -25,6 +25,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/utils.cc ============================================================================== --- head/tests/sys/fs/fusefs/utils.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/utils.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/utils.hh ============================================================================== --- head/tests/sys/fs/fusefs/utils.hh Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/utils.hh Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ struct _sem; Modified: head/tests/sys/fs/fusefs/write.cc ============================================================================== --- head/tests/sys/fs/fusefs/write.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/write.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ extern "C" { Modified: head/tests/sys/fs/fusefs/xattr.cc ============================================================================== --- head/tests/sys/fs/fusefs/xattr.cc Tue Aug 13 15:41:36 2019 (r350989) +++ head/tests/sys/fs/fusefs/xattr.cc Tue Aug 13 15:49:40 2019 (r350990) @@ -26,6 +26,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* Tests for all things relating to extended attributes and FUSE */ From owner-svn-src-head@freebsd.org Tue Aug 13 15:50:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 496C9B38B7; Tue, 13 Aug 2019 15:50:48 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467HHW6ynpz41sb; Tue, 13 Aug 2019 15:50:47 +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 BE35719A31; Tue, 13 Aug 2019 15:50:47 +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 x7DFoldm013172; Tue, 13 Aug 2019 15:50:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFoldA013171; Tue, 13 Aug 2019 15:50:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908131550.x7DFoldA013171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Aug 2019 15:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350991 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 350991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:50:48 -0000 Author: imp Date: Tue Aug 13 15:50:47 2019 New Revision: 350991 URL: https://svnweb.freebsd.org/changeset/base/350991 Log: r350976 accidentally removed nvram device. Restore it. Modified: head/sys/conf/files.i386 Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Aug 13 15:49:40 2019 (r350990) +++ head/sys/conf/files.i386 Tue Aug 13 15:50:47 2019 (r350991) @@ -278,6 +278,7 @@ dev/ntb/ntb_if.m optional ntb | ntb_transport | if_nt dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw +dev/nvram/nvram.c optional nvram isa dev/ofw/ofwpci.c optional fdt pci dev/pcf/pcf_isa.c optional pcf dev/random/ivy.c optional rdrand_rng !random_loadable From owner-svn-src-head@freebsd.org Tue Aug 13 15:52:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D038B3A41; Tue, 13 Aug 2019 15:52:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467HKV389Xz42GS; Tue, 13 Aug 2019 15:52:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 356D819BD0; Tue, 13 Aug 2019 15:52:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DFqUoF018013; Tue, 13 Aug 2019 15:52:30 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DFqTvE018007; Tue, 13 Aug 2019 15:52:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131552.x7DFqTvE018007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 15:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350992 - head/tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/fusefs X-SVN-Commit-Revision: 350992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 15:52:30 -0000 Author: asomers Date: Tue Aug 13 15:52:28 2019 New Revision: 350992 URL: https://svnweb.freebsd.org/changeset/base/350992 Log: fusefs: skip some tests when unsafe aio is disabled MFC after: 15 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/fs/fusefs/fsync.cc head/tests/sys/fs/fusefs/fsyncdir.cc head/tests/sys/fs/fusefs/read.cc head/tests/sys/fs/fusefs/utils.cc head/tests/sys/fs/fusefs/utils.hh head/tests/sys/fs/fusefs/write.cc Directory Properties: head/ (props changed) Modified: head/tests/sys/fs/fusefs/fsync.cc ============================================================================== --- head/tests/sys/fs/fusefs/fsync.cc Tue Aug 13 15:50:47 2019 (r350991) +++ head/tests/sys/fs/fusefs/fsync.cc Tue Aug 13 15:52:28 2019 (r350992) @@ -82,8 +82,17 @@ void expect_write(uint64_t ino, uint64_t size, const v }; +class AioFsync: public Fsync { +virtual void SetUp() { + if (!is_unsafe_aio_enabled()) + GTEST_SKIP() << + "vfs.aio.enable_unsafe must be set for this test"; + FuseTest::SetUp(); +} +}; + /* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236379 */ -TEST_F(Fsync, aio_fsync) +TEST_F(AioFsync, aio_fsync) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; Modified: head/tests/sys/fs/fusefs/fsyncdir.cc ============================================================================== --- head/tests/sys/fs/fusefs/fsyncdir.cc Tue Aug 13 15:50:47 2019 (r350991) +++ head/tests/sys/fs/fusefs/fsyncdir.cc Tue Aug 13 15:52:28 2019 (r350992) @@ -77,8 +77,17 @@ void expect_lookup(const char *relpath, uint64_t ino) }; +class AioFsyncDir: public FsyncDir { +virtual void SetUp() { + if (!is_unsafe_aio_enabled()) + GTEST_SKIP() << + "vfs.aio.enable_unsafe must be set for this test"; + FuseTest::SetUp(); +} +}; + /* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236379 */ -TEST_F(FsyncDir, aio_fsync) +TEST_F(AioFsyncDir, aio_fsync) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; Modified: head/tests/sys/fs/fusefs/read.cc ============================================================================== --- head/tests/sys/fs/fusefs/read.cc Tue Aug 13 15:50:47 2019 (r350991) +++ head/tests/sys/fs/fusefs/read.cc Tue Aug 13 15:52:28 2019 (r350992) @@ -73,17 +73,10 @@ void expect_lookup(const char *relpath, uint64_t ino, class AioRead: public Read { public: virtual void SetUp() { - const char *node = "vfs.aio.enable_unsafe"; - int val = 0; - size_t size = sizeof(val); - - FuseTest::SetUp(); - - ASSERT_EQ(0, sysctlbyname(node, &val, &size, NULL, 0)) - << strerror(errno); - if (!val) + if (!is_unsafe_aio_enabled()) GTEST_SKIP() << "vfs.aio.enable_unsafe must be set for this test"; + FuseTest::SetUp(); } }; Modified: head/tests/sys/fs/fusefs/utils.cc ============================================================================== --- head/tests/sys/fs/fusefs/utils.cc Tue Aug 13 15:50:47 2019 (r350991) +++ head/tests/sys/fs/fusefs/utils.cc Tue Aug 13 15:52:28 2019 (r350992) @@ -89,6 +89,18 @@ void check_environment() GTEST_SKIP() << "current user is not allowed to mount"; } +bool is_unsafe_aio_enabled(void) { + const char *node = "vfs.aio.enable_unsafe"; + int val = 0; + size_t size = sizeof(val); + + if (sysctlbyname(node, &val, &size, NULL, 0)) { + perror("sysctlbyname"); + return (false); + } + return (val != 0); +} + class FuseEnv: public Environment { virtual void SetUp() { } Modified: head/tests/sys/fs/fusefs/utils.hh ============================================================================== --- head/tests/sys/fs/fusefs/utils.hh Tue Aug 13 15:50:47 2019 (r350991) +++ head/tests/sys/fs/fusefs/utils.hh Tue Aug 13 15:52:28 2019 (r350992) @@ -44,6 +44,8 @@ inline void nap() usleep(NAP_NS / 1000); } +bool is_unsafe_aio_enabled(void); + extern const uint32_t libfuse_max_write; extern const uint32_t default_max_write; class FuseTest : public ::testing::Test { Modified: head/tests/sys/fs/fusefs/write.cc ============================================================================== --- head/tests/sys/fs/fusefs/write.cc Tue Aug 13 15:50:47 2019 (r350991) +++ head/tests/sys/fs/fusefs/write.cc Tue Aug 13 15:52:28 2019 (r350992) @@ -35,7 +35,6 @@ extern "C" { #include #include #include -#include #include #include @@ -138,17 +137,10 @@ void expect_lookup(const char *relpath, uint64_t ino, class AioWrite: public Write { virtual void SetUp() { - const char *node = "vfs.aio.enable_unsafe"; - int val = 0; - size_t size = sizeof(val); - - FuseTest::SetUp(); - - ASSERT_EQ(0, sysctlbyname(node, &val, &size, NULL, 0)) - << strerror(errno); - if (!val) + if (!is_unsafe_aio_enabled()) GTEST_SKIP() << "vfs.aio.enable_unsafe must be set for this test"; + FuseTest::SetUp(); } }; From owner-svn-src-head@freebsd.org Tue Aug 13 16:22:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EF00B4924; Tue, 13 Aug 2019 16:22:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467J0M6jG8z44Dt; Tue, 13 Aug 2019 16:22:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C80161A196; Tue, 13 Aug 2019 16:22:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DGMhtT047227; Tue, 13 Aug 2019 16:22:43 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DGMhUL047226; Tue, 13 Aug 2019 16:22:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131622.x7DGMhUL047226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 16:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350993 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 350993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 16:22:44 -0000 Author: asomers Date: Tue Aug 13 16:22:43 2019 New Revision: 350993 URL: https://svnweb.freebsd.org/changeset/base/350993 Log: Consistently use the byteorder functions in the correct direction Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21219 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Tue Aug 13 15:52:28 2019 (r350992) +++ head/sbin/ping6/ping6.c Tue Aug 13 16:22:43 2019 (r350993) @@ -1324,7 +1324,7 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq); + *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); memcpy(&outpack[ICMP6_NIQLEN], &dst.sin6_addr, sizeof(dst.sin6_addr)); @@ -1339,7 +1339,7 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq); + *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); cc = ICMP6_NIQLEN; datalen = 0; @@ -1351,7 +1351,7 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq); + *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); memcpy(&outpack[ICMP6_NIQLEN], &dst.sin6_addr, sizeof(dst.sin6_addr)); @@ -1366,14 +1366,14 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq); + *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); cc = ICMP6_NIQLEN; datalen = 0; } else { icp->icmp6_type = ICMP6_ECHO_REQUEST; icp->icmp6_code = 0; icp->icmp6_id = htons(ident); - icp->icmp6_seq = ntohs(seq); + icp->icmp6_seq = htons(seq); if (timing) { struct timeval tv; struct tv32 *tv32; From owner-svn-src-head@freebsd.org Tue Aug 13 16:25:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1565B49E3; Tue, 13 Aug 2019 16:25:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467J3R5gMnz44P6; Tue, 13 Aug 2019 16:25:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3C731A1A4; Tue, 13 Aug 2019 16:25:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DGPNNL047391; Tue, 13 Aug 2019 16:25:23 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DGPNK9047390; Tue, 13 Aug 2019 16:25:23 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131625.x7DGPNK9047390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 16:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350994 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 350994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 16:25:23 -0000 Author: asomers Date: Tue Aug 13 16:25:23 2019 New Revision: 350994 URL: https://svnweb.freebsd.org/changeset/base/350994 Log: ping: fix data type of a variable for a packet sequence number Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21244 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Tue Aug 13 16:22:43 2019 (r350993) +++ head/sbin/ping/ping.c Tue Aug 13 16:25:23 2019 (r350994) @@ -1087,7 +1087,8 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, s struct ip *ip; const void *tp; double triptime; - int dupflag, hlen, i, j, recv_len, seq; + int dupflag, hlen, i, j, recv_len; + uint16_t seq; static int old_rrlen; static char old_rr[MAX_IPOPTLEN]; From owner-svn-src-head@freebsd.org Tue Aug 13 16:50:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 362C7B59DA; Tue, 13 Aug 2019 16:50:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 467JcD0fv0z45tw; Tue, 13 Aug 2019 16:50:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x434.google.com with SMTP id i30so3218000pfk.9; Tue, 13 Aug 2019 09:50:19 -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=tjFMvSlWAi+N0HNGo3ey/1qIx2QM32Kuft6tri6p2+A=; b=BPW3u6Tsn5cfrk1VwRg9Z2T/kKGA7nqqLgB6gusmf9WKcDipXFdpZT/SmNY8maD6QU HbtDDLAhnZvkhN4rh5d86DGNoLEjZL2bZE6PQEvPOnxnhiRdiTJC0FXDpJ6Ng5/zVKL/ JkMaGhM9Du9fgRci6X5MvTlQIG3rPAdQXHiBSZ8CML5wVmfrb/j9R/px+bhcLyV1Q+Th AOccHn4QcGsdPPMMgIegvMJdH/zVvHx9n72AA0raC0EIa23g6A2EOQt+pREuiZs9bZid LVpDK45uBIE9IO1xJEfOKK8eH58tkoE/f2JEvDGzQqVCNwK2AKQE4EbJrjemwtQ9B6KH 9F1w== 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=tjFMvSlWAi+N0HNGo3ey/1qIx2QM32Kuft6tri6p2+A=; b=d+9HXw3O4w/pytq7pOHQZr90CfDuo6smfrkXundtcBRd5YuVT239ey4o3XmXaARaAH SQYzdC1KzpkU3TMeoCE0VZJcCKcDkYfWOqY59By6Lwz0Op61RKb2xmGxQumAEELc5L7+ QrD8v8BATgoGfxoehRtclbyy1/8eqw0w8MSBwPFl2bnAZgGBNMtv74L+YN/6JNECfOdY 7IkHbSFfWBl8VILbSsbeaEBGYZMQPeLw8fCWpEt3kQrP1VQ0Nt9f7ZY7iamKBcJJaQMN Q4bMVs2YiZ0pVu4z5xBX6keGyW0pQZ0tdcnrDMwvC5foJxb9VbN84kOXbo1j18CYuuJp u+Dw== X-Gm-Message-State: APjAAAUnQ4BLLAuG+NlqXHajK9UfYneLhPCIgMuH8tld9Tm/MjLCQHVD +pxOvP39tb/RS1et2WNGweRkrODtgL8= X-Google-Smtp-Source: APXvYqz+9jHaqHgBlrVmv9p46zZhGcZLzn6HRQdxBreqrMZ7sCYqLONCADExWvr0lfmVwXPAR9YSmQ== X-Received: by 2002:a63:c203:: with SMTP id b3mr6172092pgd.450.1565715017830; Tue, 13 Aug 2019 09:50:17 -0700 (PDT) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id m4sm128614725pgs.71.2019.08.13.09.50.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Aug 2019 09:50:16 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r350993 - head/sbin/ping6 From: "Enji Cooper (yaneurabeya)" In-Reply-To: <201908131622.x7DGMhUL047226@repo.freebsd.org> Date: Tue, 13 Aug 2019 09:50:14 -0700 Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201908131622.x7DGMhUL047226@repo.freebsd.org> To: Alan Somers X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 467JcD0fv0z45tw X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 16:50:20 -0000 > On Aug 13, 2019, at 09:22, Alan Somers wrote: >=20 > Author: asomers > Date: Tue Aug 13 16:22:43 2019 > New Revision: 350993 > URL: https://svnweb.freebsd.org/changeset/base/350993 >=20 > Log: > Consistently use the byteorder functions in the correct direction >=20 > Though ntohs and htons are functionally identical, they have = different meanings.Using the correct one helps to document the code. This statement is only true for BE platforms. For LE platforms like = i386/x64, ntohs and htons actually does a endianness conversion: sys/powerpc/include/endian.h:#define __ntohs(x) = (__bswap16((__uint16_t)(x))) sys/powerpc/include/endian.h:#define __ntohs(x) = ((__uint16_t)(x)) sys/sparc64/include/endian.h:#define __ntohs(x) = ((__uint16_t)(x)) sys/x86/include/endian.h:#define __ntohs(x) __bswap16(x) sys/mips/include/endian.h:#define __ntohs(x) = ((__uint16_t)(x)) sys/mips/include/endian.h:#define __ntohs(x) (__bswap16((x))) sys/arm/include/endian.h:#define __ntohs(x) ((__uint16_t)(x)) sys/arm/include/endian.h:#define __ntohs(x) (__bswap16(x)) sys/arm64/include/endian.h:#define __ntohs(x) (__bswap16(x)) sys/riscv/include/endian.h:#define __ntohs(x) (__bswap16(x)) sys/sys/param.h:#define ntohs(x) __ntohs(x) sys/netinet/in.h:#define ntohs(x) __ntohs(x) Thanks, -Enji From owner-svn-src-head@freebsd.org Tue Aug 13 16:54:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FB6BB5CC2 for ; Tue, 13 Aug 2019 16:54:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 467JhX38pyz46Yq for ; Tue, 13 Aug 2019 16:54:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id r6so80243877qkc.0 for ; Tue, 13 Aug 2019 09:54:04 -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=9NXwsKLajKr99S/pxr1BSITxGFaKNUfYXMupH6pzEZ8=; b=rUVDkLTM07yH6V0ZjVKHmMWoAeOyGkQW8NH06miPEnUVnZv2bQ7Z7onUKkQVnfzg+9 AQ8ljy54Hq0AqYD0OxvHiHPzwVcQF+rXRi0oe8bwBalo1yKKWgDyp/A1GEVuYvxaS7Da asKGrKOBlJIvIBsIibREDfRbb7R6QYiY09Hw+yCwdRyQ3HrfL5kLtd6kufHvHcX2aM+7 M91PM4VTkq2JzcUdzTNAP9vFGH03vnAoo9ro5qDJmuyjGfuTtxX3xP3VPhXtgalbygM2 PlWLKiCYIV8buIqgB+J4iZJP590qjqcwGHJAd2AvQ6AGCVxN4g7hbidtlvIllcjcun/3 7w7A== 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=9NXwsKLajKr99S/pxr1BSITxGFaKNUfYXMupH6pzEZ8=; b=oPiFu8sRzgzP1V9T/YLYSuWYBKZHYwkImepGs01wjeWGlXkZZjoukvuJv2e8DKBba2 PMUl1xREfkp0NQNTMiitEBiiTvBfF7kFje4fVUIuYCcYjPYQtaihpV88NxJL2e2Rlbp/ eqGj0anzagJwxbZVvaQN0z9joREtqxzG5/uwAmHTcV8B4wElrzytlX8dG4717oPp7d6G Cd6m8HLY/oZZ/mLDjHJI7yWh45IHY4FBONK/WS+JZkAcV4qezPWshb5cySMguQ36RgD4 ZJ+8+Jdp8GQriFpYCB1XBTHzdJSiStG4A7LsGiRZ87UrAaK9dFQ7NRzAFfgaU/eB/PjH HFLg== X-Gm-Message-State: APjAAAVVRYDzSURJlP5spv3O4O+/C9842yiSgRqQXrNnnQbehx1xQKyH 6ODuoeTzyw1tb3REmT8XzwPvTeBtHxeMPqmeLCiM9g== X-Google-Smtp-Source: APXvYqwT1Kv3+et2AGmFh2g/jV5CoYlzf2n/D4lv4tgdrhOvOgTv/Rop66yysc+GDb4bXC1r7/IRPRCTaP3+n1eT+8M= X-Received: by 2002:a37:c87:: with SMTP id 129mr31806674qkm.240.1565715243232; Tue, 13 Aug 2019 09:54:03 -0700 (PDT) MIME-Version: 1.0 References: <201908131622.x7DGMhUL047226@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 13 Aug 2019 10:53:52 -0600 Message-ID: Subject: Re: svn commit: r350993 - head/sbin/ping6 To: "Enji Cooper (yaneurabeya)" Cc: Alan Somers , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 467JhX38pyz46Yq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=rUVDkLTM; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; RCVD_IN_DNSWL_NONE(0.00)[c.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.95)[ip: (-9.35), ipnet: 2607:f8b0::/32(-2.97), asn: 15169(-2.39), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 16:54:05 -0000 On Tue, Aug 13, 2019 at 10:50 AM Enji Cooper (yaneurabeya) < yaneurabeya@gmail.com> wrote: > > > On Aug 13, 2019, at 09:22, Alan Somers wrote: > > > > Author: asomers > > Date: Tue Aug 13 16:22:43 2019 > > New Revision: 350993 > > URL: https://svnweb.freebsd.org/changeset/base/350993 > > > > Log: > > Consistently use the byteorder functions in the correct direction > > > > Though ntohs and htons are functionally identical, they have different > meanings.Using the correct one helps to document the code. > > This statement is only true for BE platforms. For LE platforms like > i386/x64, ntohs and htons actually does a endianness conversion: > > sys/powerpc/include/endian.h:#define __ntohs(x) > (__bswap16((__uint16_t)(x))) > sys/powerpc/include/endian.h:#define __ntohs(x) ((__uint16_t)(x)) > sys/sparc64/include/endian.h:#define __ntohs(x) ((__uint16_t)(x)) > sys/x86/include/endian.h:#define __ntohs(x) __bswap16(x) > sys/mips/include/endian.h:#define __ntohs(x) ((__uint16_t)(x)) > sys/mips/include/endian.h:#define __ntohs(x) (__bswap16((x))) > sys/arm/include/endian.h:#define __ntohs(x) ((__uint16_t)(x)) > sys/arm/include/endian.h:#define __ntohs(x) (__bswap16(x)) > sys/arm64/include/endian.h:#define __ntohs(x) (__bswap16(x)) > sys/riscv/include/endian.h:#define __ntohs(x) (__bswap16(x)) > sys/sys/param.h:#define ntohs(x) __ntohs(x) > sys/netinet/in.h:#define ntohs(x) __ntohs(x) > The statement was that htons and ntohs are the same actual code, but document different things. And that's correct. htons and ntohs can be used indiscriminately and the code will still work. But using htons when putting data into network byte order and ntohs when putting it into host order documents the operations better. This is independent of endian: either both do nothing, or both do bswap16. Warner From owner-svn-src-head@freebsd.org Tue Aug 13 19:24:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DC0FB9FD8; Tue, 13 Aug 2019 19:24:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467N1t2L0xz4H81; Tue, 13 Aug 2019 19:24:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 333D01C48F; Tue, 13 Aug 2019 19:24:18 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DJOI9Q053913; Tue, 13 Aug 2019 19:24:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DJOIqJ053912; Tue, 13 Aug 2019 19:24:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131924.x7DJOIqJ053912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 19:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350997 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 350997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 19:24:18 -0000 Author: asomers Date: Tue Aug 13 19:24:17 2019 New Revision: 350997 URL: https://svnweb.freebsd.org/changeset/base/350997 Log: ping6: use the monotonic clock to measure durations Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21226 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Tue Aug 13 19:23:45 2019 (r350996) +++ head/sbin/ping6/ping6.c Tue Aug 13 19:24:17 2019 (r350997) @@ -107,7 +107,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -133,6 +132,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef IPSEC @@ -144,7 +144,7 @@ __FBSDID("$FreeBSD$"); struct tv32 { u_int32_t tv32_sec; - u_int32_t tv32_usec; + u_int32_t tv32_nsec; }; #define MAXPACKETLEN 131072 @@ -288,7 +288,6 @@ static void pr_rthdr(void *, size_t); static int pr_bitrange(u_int32_t, int, int); static void pr_retip(struct ip6_hdr *, u_char *); static void summary(void); -static void tvsub(struct timeval *, struct timeval *); static int setpolicy(int, char *); static char *nigroup(char *, int); static void usage(void); @@ -296,7 +295,7 @@ static void usage(void); int main(int argc, char *argv[]) { - struct timeval last, intvl; + struct timespec last, intvl; struct sockaddr_in6 from, *sin6; struct addrinfo hints, *res; struct sigaction si_sa; @@ -456,15 +455,15 @@ main(int argc, char *argv[]) errx(1, "%s: only root may use interval < 1s", strerror(EPERM)); } - intvl.tv_sec = (long)t; - intvl.tv_usec = - (long)((t - intvl.tv_sec) * 1000000); + intvl.tv_sec = (time_t)t; + intvl.tv_nsec = + (long)((t - intvl.tv_sec) * 1000000000); if (intvl.tv_sec < 0) errx(1, "illegal timing interval %s", optarg); /* less than 1/hz does not make sense */ - if (intvl.tv_sec == 0 && intvl.tv_usec < 1) { + if (intvl.tv_sec == 0 && intvl.tv_nsec < 1000) { warnx("too small interval, raised to .000001"); - intvl.tv_usec = 1; + intvl.tv_nsec = 1000; } options |= F_INTERVAL; break; @@ -1102,7 +1101,7 @@ main(int argc, char *argv[]) while (preload--) pinger(); } - gettimeofday(&last, NULL); + clock_gettime(CLOCK_MONOTONIC, &last); sigemptyset(&si_sa.sa_mask); si_sa.sa_flags = 0; @@ -1121,15 +1120,15 @@ main(int argc, char *argv[]) } if (options & F_FLOOD) { intvl.tv_sec = 0; - intvl.tv_usec = 10000; + intvl.tv_nsec = 10000000; } else if ((options & F_INTERVAL) == 0) { intvl.tv_sec = interval / 1000; - intvl.tv_usec = interval % 1000 * 1000; + intvl.tv_nsec = interval % 1000 * 1000000; } almost_done = 0; while (seenint == 0) { - struct timeval now, timeout; + struct timespec now, timeout; struct msghdr m; struct iovec iov[2]; fd_set rfds; @@ -1147,21 +1146,13 @@ main(int argc, char *argv[]) #endif FD_ZERO(&rfds); FD_SET(srecv, &rfds); - gettimeofday(&now, NULL); - timeout.tv_sec = last.tv_sec + intvl.tv_sec - now.tv_sec; - timeout.tv_usec = last.tv_usec + intvl.tv_usec - now.tv_usec; - while (timeout.tv_usec < 0) { - timeout.tv_usec += 1000000; - timeout.tv_sec--; - } - while (timeout.tv_usec > 1000000) { - timeout.tv_usec -= 1000000; - timeout.tv_sec++; - } + clock_gettime(CLOCK_MONOTONIC, &now); + timespecadd(&last, &intvl, &timeout); + timespecsub(&timeout, &now, &timeout); if (timeout.tv_sec < 0) - timeout.tv_sec = timeout.tv_usec = 0; + timespecclear(&timeout); - n = select(srecv + 1, &rfds, NULL, NULL, &timeout); + n = pselect(srecv + 1, &rfds, NULL, NULL, &timeout, NULL); if (n < 0) continue; /* EINTR */ if (n == 1) { @@ -1222,17 +1213,18 @@ main(int argc, char *argv[]) * if we've received any packets or (waittime) * milliseconds if we haven't. */ - intvl.tv_usec = 0; + intvl.tv_nsec = 0; if (nreceived) { intvl.tv_sec = 2 * tmax / 1000; if (intvl.tv_sec == 0) intvl.tv_sec = 1; } else { intvl.tv_sec = waittime / 1000; - intvl.tv_usec = waittime % 1000 * 1000; + intvl.tv_nsec = + waittime % 1000 * 1000000; } } - gettimeofday(&last, NULL); + clock_gettime(CLOCK_MONOTONIC, &last); if (ntransmitted - nreceived - 1 > nmissedmax) { nmissedmax = ntransmitted - nreceived - 1; if (options & F_MISSED) @@ -1275,7 +1267,7 @@ onsignal(int sig) * Compose and transmit an ICMP ECHO REQUEST packet. The IP packet * will be added on by the kernel. The ID field is our UNIX process ID, * and the sequence number is an ascending integer. The first 8 bytes - * of the data portion are used to hold a UNIX "timeval" struct in VAX + * of the data portion are used to hold a UNIX "timespec" struct in VAX * byte-order, to compute the round-trip time. */ static size_t @@ -1375,12 +1367,18 @@ pinger(void) icp->icmp6_id = htons(ident); icp->icmp6_seq = htons(seq); if (timing) { - struct timeval tv; + struct timespec tv; struct tv32 *tv32; - (void)gettimeofday(&tv, NULL); + (void)clock_gettime(CLOCK_MONOTONIC, &tv); tv32 = (struct tv32 *)&outpack[ICMP6ECHOLEN]; - tv32->tv32_sec = htonl(tv.tv_sec); - tv32->tv32_usec = htonl(tv.tv_usec); + /* + * Truncate seconds down to 32 bits in order + * to fit the timestamp within 8 bytes of the + * packet. We're only concerned with + * durations, not absolute times. + */ + tv32->tv32_sec = (uint32_t)htonl(tv.tv_sec); + tv32->tv32_nsec = (uint32_t)htonl(tv.tv_nsec); } cc = ICMP6ECHOLEN + datalen; } @@ -1509,7 +1507,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) int fromlen; u_char *cp = NULL, *dp, *end = buf + cc; struct in6_pktinfo *pktinfo = NULL; - struct timeval tv, tp; + struct timespec tv, tp; struct tv32 *tpp; double triptime = 0; int dupflag; @@ -1518,7 +1516,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) u_int16_t seq; char dnsname[MAXDNAME + 1]; - (void)gettimeofday(&tv, NULL); + (void)clock_gettime(CLOCK_MONOTONIC, &tv); if (!mhdr || !mhdr->msg_name || mhdr->msg_namelen != sizeof(struct sockaddr_in6) || @@ -1557,10 +1555,10 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) if (timing) { tpp = (struct tv32 *)(icp + 1); tp.tv_sec = ntohl(tpp->tv32_sec); - tp.tv_usec = ntohl(tpp->tv32_usec); - tvsub(&tv, &tp); + tp.tv_nsec = ntohl(tpp->tv32_nsec); + timespecsub(&tv, &tp, &tv); triptime = ((double)tv.tv_sec) * 1000.0 + - ((double)tv.tv_usec) / 1000.0; + ((double)tv.tv_nsec) / 1000000.0; tsum += triptime; tsumsq += triptime * triptime; if (triptime < tmin) @@ -2206,21 +2204,6 @@ get_pathmtu(struct msghdr *mhdr) } #endif return(0); -} - -/* - * tvsub -- - * Subtract 2 timeval structs: out = out - in. Out is assumed to - * be >= in. - */ -static void -tvsub(struct timeval *out, struct timeval *in) -{ - if ((out->tv_usec -= in->tv_usec) < 0) { - --out->tv_sec; - out->tv_usec += 1000000; - } - out->tv_sec -= in->tv_sec; } /* From owner-svn-src-head@freebsd.org Tue Aug 13 19:27:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2760BA191; Tue, 13 Aug 2019 19:27:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467N5S4GQnz4HNc; Tue, 13 Aug 2019 19:27:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FB701C494; Tue, 13 Aug 2019 19:27:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DJRO1t054212; Tue, 13 Aug 2019 19:27:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DJROQ5054211; Tue, 13 Aug 2019 19:27:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908131927.x7DJROQ5054211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Aug 2019 19:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350998 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 350998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 19:27:24 -0000 Author: asomers Date: Tue Aug 13 19:27:23 2019 New Revision: 350998 URL: https://svnweb.freebsd.org/changeset/base/350998 Log: ping: use the monotonic clock to measure durations Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21245 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Tue Aug 13 19:24:17 2019 (r350997) +++ head/sbin/ping/ping.c Tue Aug 13 19:27:23 2019 (r350998) @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define INADDR_LEN ((int)sizeof(in_addr_t)) @@ -119,7 +120,7 @@ __FBSDID("$FreeBSD$"); struct tv32 { int32_t tv32_sec; - int32_t tv32_usec; + int32_t tv32_nsec; }; /* various options */ @@ -217,11 +218,10 @@ static char *pr_addr(struct in_addr); static char *pr_ntime(n_time); static void pr_icmph(struct icmp *); static void pr_iph(struct ip *); -static void pr_pack(char *, int, struct sockaddr_in *, struct timeval *); +static void pr_pack(char *, int, struct sockaddr_in *, struct timespec *); static void pr_retip(struct ip *); static void status(int); static void stopit(int); -static void tvsub(struct timeval *, const struct timeval *); static void usage(void) __dead2; int @@ -229,7 +229,7 @@ main(int argc, char *const *argv) { struct sockaddr_in from, sock_in; struct in_addr ifaddr; - struct timeval last, intvl; + struct timespec last, intvl; struct iovec iov; struct ip *ip; struct msghdr msg; @@ -247,7 +247,7 @@ main(int argc, char *const *argv) long ltmp; int almost_done, ch, df, hold, i, icmp_len, mib[4], preload; int ssend_errno, srecv_errno, tos, ttl; - char ctrl[CMSG_SPACE(sizeof(struct timeval))]; + char ctrl[CMSG_SPACE(sizeof(struct timespec))]; char hnamebuf[MAXHOSTNAMELEN], snamebuf[MAXHOSTNAMELEN]; #ifdef IP_OPTIONS char rspace[MAX_IPOPTLEN]; /* record route space */ @@ -871,19 +871,19 @@ main(int argc, char *const *argv) while (preload--) /* fire off them quickies */ pinger(); } - (void)gettimeofday(&last, NULL); + (void)clock_gettime(CLOCK_MONOTONIC, &last); if (options & F_FLOOD) { intvl.tv_sec = 0; - intvl.tv_usec = 10000; + intvl.tv_nsec = 10000000; } else { intvl.tv_sec = interval / 1000; - intvl.tv_usec = interval % 1000 * 1000; + intvl.tv_nsec = interval % 1000 * 1000000; } almost_done = 0; while (!finish_up) { - struct timeval now, timeout; + struct timespec now, timeout; fd_set rfds; int cc, n; @@ -892,24 +892,16 @@ main(int argc, char *const *argv) errx(EX_OSERR, "descriptor too large"); FD_ZERO(&rfds); FD_SET(srecv, &rfds); - (void)gettimeofday(&now, NULL); - timeout.tv_sec = last.tv_sec + intvl.tv_sec - now.tv_sec; - timeout.tv_usec = last.tv_usec + intvl.tv_usec - now.tv_usec; - while (timeout.tv_usec < 0) { - timeout.tv_usec += 1000000; - timeout.tv_sec--; - } - while (timeout.tv_usec >= 1000000) { - timeout.tv_usec -= 1000000; - timeout.tv_sec++; - } + (void)clock_gettime(CLOCK_MONOTONIC, &now); + timespecadd(&last, &intvl, &timeout); + timespecsub(&timeout, &now, &timeout); if (timeout.tv_sec < 0) - timerclear(&timeout); - n = select(srecv + 1, &rfds, NULL, NULL, &timeout); + timespecclear(&timeout); + n = pselect(srecv + 1, &rfds, NULL, NULL, &timeout, NULL); if (n < 0) continue; /* Must be EINTR. */ if (n == 1) { - struct timeval *tv = NULL; + struct timespec *tv = NULL; #ifdef SO_TIMESTAMP struct cmsghdr *cmsg = (struct cmsghdr *)&ctrl; @@ -932,7 +924,7 @@ main(int argc, char *const *argv) } #endif if (tv == NULL) { - (void)gettimeofday(&now, NULL); + (void)clock_gettime(CLOCK_MONOTONIC, &now); tv = &now; } pr_pack((char *)packet, cc, &from, tv); @@ -956,17 +948,17 @@ main(int argc, char *const *argv) if (almost_done) break; almost_done = 1; - intvl.tv_usec = 0; + intvl.tv_nsec = 0; if (nreceived) { intvl.tv_sec = 2 * tmax / 1000; if (!intvl.tv_sec) intvl.tv_sec = 1; } else { intvl.tv_sec = waittime / 1000; - intvl.tv_usec = waittime % 1000 * 1000; + intvl.tv_nsec = waittime % 1000 * 1000000; } } - (void)gettimeofday(&last, NULL); + (void)clock_gettime(CLOCK_MONOTONIC, &last); if (ntransmitted - nreceived - 1 > nmissedmax) { nmissedmax = ntransmitted - nreceived - 1; if (options & F_MISSED) @@ -1003,13 +995,13 @@ stopit(int sig __unused) * Compose and transmit an ICMP ECHO REQUEST packet. The IP packet * will be added on by the kernel. The ID field is our UNIX process ID, * and the sequence number is an ascending integer. The first TIMEVAL_LEN - * bytes of the data portion are used to hold a UNIX "timeval" struct in + * bytes of the data portion are used to hold a UNIX "timespec" struct in * host byte-order, to compute the round-trip time. */ static void pinger(void) { - struct timeval now; + struct timespec now; struct tv32 tv32; struct ip *ip; struct icmp *icp; @@ -1027,13 +1019,18 @@ pinger(void) CLR(ntransmitted % mx_dup_ck); if ((options & F_TIME) || timing) { - (void)gettimeofday(&now, NULL); - - tv32.tv32_sec = htonl(now.tv_sec); - tv32.tv32_usec = htonl(now.tv_usec); + (void)clock_gettime(CLOCK_MONOTONIC, &now); + /* + * Truncate seconds down to 32 bits in order + * to fit the timestamp within 8 bytes of the + * packet. We're only concerned with + * durations, not absolute times. + */ + tv32.tv32_sec = (uint32_t)htonl(now.tv_sec); + tv32.tv32_nsec = (uint32_t)htonl(now.tv_nsec); if (options & F_TIME) icp->icmp_otime = htonl((now.tv_sec % (24*60*60)) - * 1000 + now.tv_usec / 1000); + * 1000 + now.tv_nsec / 1000000); if (timing) bcopy((void *)&tv32, (void *)&outpack[ICMP_MINLEN + phdr_len], @@ -1079,7 +1076,7 @@ pinger(void) * program to be run without having intermingled output (or statistics!). */ static void -pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timeval *tv) +pr_pack(char *buf, int cc, struct sockaddr_in *from, struct timespec *tv) { struct in_addr ina; u_char *cp, *dp; @@ -1112,7 +1109,7 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, s ++nreceived; triptime = 0.0; if (timing) { - struct timeval tv1; + struct timespec tv1; struct tv32 tv32; #ifndef icmp_data tp = &icp->icmp_ip; @@ -1126,10 +1123,10 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, s /* Copy to avoid alignment problems: */ memcpy(&tv32, tp, sizeof(tv32)); tv1.tv_sec = ntohl(tv32.tv32_sec); - tv1.tv_usec = ntohl(tv32.tv32_usec); - tvsub(tv, &tv1); + tv1.tv_nsec = ntohl(tv32.tv32_nsec); + timespecsub(tv, &tv1, tv); triptime = ((double)tv->tv_sec) * 1000.0 + - ((double)tv->tv_usec) / 1000.0; + ((double)tv->tv_nsec) / 1000000.0; tsum += triptime; tsumsq += triptime * triptime; if (triptime < tmin) @@ -1381,22 +1378,6 @@ in_cksum(u_short *addr, int len) sum += (sum >> 16); /* add carry */ answer = ~sum; /* truncate to 16 bits */ return(answer); -} - -/* - * tvsub -- - * Subtract 2 timeval structs: out = out - in. Out is assumed to - * be >= in. - */ -static void -tvsub(struct timeval *out, const struct timeval *in) -{ - - if ((out->tv_usec -= in->tv_usec) < 0) { - --out->tv_sec; - out->tv_usec += 1000000; - } - out->tv_sec -= in->tv_sec; } /* From owner-svn-src-head@freebsd.org Tue Aug 13 19:39:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29453BA4FC; Tue, 13 Aug 2019 19:39:37 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467NMY0Jxhz4J3S; Tue, 13 Aug 2019 19:39:37 +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 E08E61C674; Tue, 13 Aug 2019 19:39:36 +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 x7DJdaCk060704; Tue, 13 Aug 2019 19:39:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DJdagq060703; Tue, 13 Aug 2019 19:39:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908131939.x7DJdagq060703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Aug 2019 19:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351000 - in head/sys: amd64/vmm/io x86/x86 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/vmm/io x86/x86 X-SVN-Commit-Revision: 351000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 19:39:37 -0000 Author: emaste Date: Tue Aug 13 19:39:36 2019 New Revision: 351000 URL: https://svnweb.freebsd.org/changeset/base/351000 Log: sys/{x86,amd64}: remove one of doubled ;s MFC after: 1 week Modified: head/sys/amd64/vmm/io/vlapic.c head/sys/x86/x86/local_apic.c Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Tue Aug 13 19:29:33 2019 (r350999) +++ head/sys/amd64/vmm/io/vlapic.c Tue Aug 13 19:39:36 2019 (r351000) @@ -316,7 +316,7 @@ vlapic_get_lvtptr(struct vlapic *vlapic, uint32_t offs return (&lapic->lvt_cmci); case APIC_OFFSET_TIMER_LVT ... APIC_OFFSET_ERROR_LVT: i = (offset - APIC_OFFSET_TIMER_LVT) >> 2; - return ((&lapic->lvt_timer) + i);; + return ((&lapic->lvt_timer) + i); default: panic("vlapic_get_lvt: invalid LVT\n"); } Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Aug 13 19:29:33 2019 (r350999) +++ head/sys/x86/x86/local_apic.c Tue Aug 13 19:39:36 2019 (r351000) @@ -130,7 +130,7 @@ struct lvt { struct lapic { struct lvt la_lvts[APIC_LVT_MAX + 1]; - struct lvt la_elvts[APIC_ELVT_MAX + 1];; + struct lvt la_elvts[APIC_ELVT_MAX + 1]; u_int la_id:8; u_int la_cluster:4; u_int la_cluster_id:2; From owner-svn-src-head@freebsd.org Tue Aug 13 20:06:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F7CEBAF30; Tue, 13 Aug 2019 20:06:59 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Nz72cGGz4KJ1; Tue, 13 Aug 2019 20:06:59 +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 3BB771CC0B; Tue, 13 Aug 2019 20:06:59 +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 x7DK6xF2077826; Tue, 13 Aug 2019 20:06:59 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DK6tOe077809; Tue, 13 Aug 2019 20:06:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908132006.x7DK6tOe077809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 13 Aug 2019 20:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351001 - in head: sbin/bsdlabel sbin/fdisk sbin/sunlabel share/man/man4 sys/conf sys/geom sys/modules/geom/geom_bsd sys/modules/geom/geom_fox sys/modules/geom/geom_mbr sys/modules/geom... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: sbin/bsdlabel sbin/fdisk sbin/sunlabel share/man/man4 sys/conf sys/geom sys/modules/geom/geom_bsd sys/modules/geom/geom_fox sys/modules/geom/geom_mbr sys/modules/geom/geom_sunlabel sys/module... X-SVN-Commit-Revision: 351001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 20:06:59 -0000 Author: cem Date: Tue Aug 13 20:06:55 2019 New Revision: 351001 URL: https://svnweb.freebsd.org/changeset/base/351001 Log: Remove deprecated GEOM classes Follow-up on r322318 and r322319 and remove the deprecated modules. Shift some now-unused kernel files into userspace utilities that incorporate them. Remove references to removed GEOM classes in userspace utilities. Reviewed by: imp (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21249 Added: head/sbin/fdisk/fdisk_mbr_enc.c - copied, changed from r351000, head/sys/geom/geom_mbr_enc.c head/sbin/fdisk/fdisk_mbr_enc.h (contents, props changed) head/sbin/sunlabel/sun_disklabel.h - copied unchanged from r351000, head/sys/sys/sun_disklabel.h head/sbin/sunlabel/sunlabel_enc.c - copied, changed from r351000, head/sys/geom/geom_sunlabel_enc.c Deleted: head/share/man/man4/geom_fox.4 head/sys/geom/geom_bsd.c head/sys/geom/geom_fox.c head/sys/geom/geom_mbr.c head/sys/geom/geom_mbr_enc.c head/sys/geom/geom_sunlabel.c head/sys/geom/geom_sunlabel_enc.c head/sys/geom/geom_vol_ffs.c head/sys/modules/geom/geom_bsd/ head/sys/modules/geom/geom_fox/ head/sys/modules/geom/geom_mbr/ head/sys/modules/geom/geom_sunlabel/ head/sys/modules/geom/geom_vol_ffs/ head/sys/sys/sun_disklabel.h Modified: head/sbin/bsdlabel/bsdlabel.c head/sbin/fdisk/Makefile head/sbin/fdisk/fdisk.c head/sbin/sunlabel/Makefile head/sbin/sunlabel/sunlabel.c head/share/man/man4/Makefile head/share/man/man4/geom.4 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/sys/diskmbr.h head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/sbin/bsdlabel/bsdlabel.c ============================================================================== --- head/sbin/bsdlabel/bsdlabel.c Tue Aug 13 19:39:36 2019 (r351000) +++ head/sbin/bsdlabel/bsdlabel.c Tue Aug 13 20:06:55 2019 (r351001) @@ -381,8 +381,6 @@ static int writelabel(void) { int i, fd, serrno; - struct gctl_req *grq; - char const *errstr; struct disklabel *lp = &lab; if (disable_write) { @@ -423,39 +421,8 @@ writelabel(void) return (1); } - /* Give up if GEOM_BSD is not available. */ - if (geom_class_available("BSD") == 0) { - warnc(serrno, "%s", specname); - return (1); - } - - grq = gctl_get_handle(); - gctl_ro_param(grq, "verb", -1, "write label"); - gctl_ro_param(grq, "class", -1, "BSD"); - gctl_ro_param(grq, "geom", -1, pname); - gctl_ro_param(grq, "label", 148+16*8, - bootarea + labeloffset + labelsoffset * lab.d_secsize); - errstr = gctl_issue(grq); - if (errstr != NULL) { - warnx("%s", errstr); - gctl_free(grq); - return(1); - } - gctl_free(grq); - if (installboot) { - grq = gctl_get_handle(); - gctl_ro_param(grq, "verb", -1, "write bootcode"); - gctl_ro_param(grq, "class", -1, "BSD"); - gctl_ro_param(grq, "geom", -1, pname); - gctl_ro_param(grq, "bootcode", BBSIZE, bootarea); - errstr = gctl_issue(grq); - if (errstr != NULL) { - warnx("%s", errstr); - gctl_free(grq); - return (1); - } - gctl_free(grq); - } + warnc(serrno, "%s", specname); + return (1); } else { if (write(fd, bootarea, bbsize) != bbsize) { warn("write %s", specname); Modified: head/sbin/fdisk/Makefile ============================================================================== --- head/sbin/fdisk/Makefile Tue Aug 13 19:39:36 2019 (r351000) +++ head/sbin/fdisk/Makefile Tue Aug 13 20:06:55 2019 (r351001) @@ -2,11 +2,9 @@ PACKAGE=runtime PROG= fdisk -SRCS= fdisk.c geom_mbr_enc.c +SRCS= fdisk.c fdisk_mbr_enc.c WARNS?= 4 MAN= fdisk.8 - -.PATH: ${SRCTOP}/sys/geom LIBADD= geom Modified: head/sbin/fdisk/fdisk.c ============================================================================== --- head/sbin/fdisk/fdisk.c Tue Aug 13 19:39:36 2019 (r351000) +++ head/sbin/fdisk/fdisk.c Tue Aug 13 20:06:55 2019 (r351001) @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fdisk_mbr_enc.h" + static int iotest; #define NO_DISK_SECTORS ((u_int32_t)-1) @@ -786,47 +788,17 @@ geom_class_available(const char *name) static int write_disk(off_t sector, void *buf) { - struct gctl_req *grq; - const char *errmsg; - char *pname; - int error; + ssize_t wr; - /* Check that GEOM_MBR is available */ - if (geom_class_available("MBR") != 0) { - grq = gctl_get_handle(); - gctl_ro_param(grq, "verb", -1, "write MBR"); - gctl_ro_param(grq, "class", -1, "MBR"); - pname = g_providername(fd); - if (pname == NULL) { - warn("Error getting providername for %s", disk); - return (-1); - } - gctl_ro_param(grq, "geom", -1, pname); - gctl_ro_param(grq, "data", secsize, buf); - errmsg = gctl_issue(grq); - free(pname); - if (errmsg == NULL) { - gctl_free(grq); - return(0); - } - if (!q_flag) - warnx("GEOM_MBR: %s", errmsg); - gctl_free(grq); - } else { - /* - * Try to write MBR directly. This may help when disk - * is not in use. - * XXX: hardcoded sectorsize - */ - error = pwrite(fd, buf, secsize, (sector * 512)); - if (error == secsize) - return (0); - } - /* - * GEOM_MBR is not available or failed to write MBR. - * Now check that we have GEOM_PART and recommend to use gpart (8). + * Try to write MBR directly. This may help when disk + * is not in use. + * XXX: hardcoded sectorsize */ + wr = pwrite(fd, buf, secsize, (sector * 512)); + if (wr == secsize) + return (0); + if (geom_class_available("PART") != 0) warnx("Failed to write MBR. Try to use gpart(8)."); else Copied and modified: head/sbin/fdisk/fdisk_mbr_enc.c (from r351000, head/sys/geom/geom_mbr_enc.c) ============================================================================== --- head/sys/geom/geom_mbr_enc.c Tue Aug 13 19:39:36 2019 (r351000, copy source) +++ head/sbin/fdisk/fdisk_mbr_enc.c Tue Aug 13 20:06:55 2019 (r351001) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fdisk_mbr_enc.h" + void dos_partition_dec(void const *pp, struct dos_partition *d) { Added: head/sbin/fdisk/fdisk_mbr_enc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/fdisk/fdisk_mbr_enc.h Tue Aug 13 20:06:55 2019 (r351001) @@ -0,0 +1,34 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Conrad Meyer + * + * 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 + +struct dos_partition; +void dos_partition_dec(void const *pp, struct dos_partition *d); +void dos_partition_enc(void *pp, struct dos_partition *d); Modified: head/sbin/sunlabel/Makefile ============================================================================== --- head/sbin/sunlabel/Makefile Tue Aug 13 19:39:36 2019 (r351000) +++ head/sbin/sunlabel/Makefile Tue Aug 13 20:06:55 2019 (r351001) @@ -1,9 +1,7 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/geom - PROG= sunlabel -SRCS= sunlabel.c geom_sunlabel_enc.c +SRCS= sunlabel.c sunlabel_enc.c MAN= sunlabel.8 .if ${MACHINE_CPUARCH} == "sparc64" Copied: head/sbin/sunlabel/sun_disklabel.h (from r351000, head/sys/sys/sun_disklabel.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/sunlabel/sun_disklabel.h Tue Aug 13 20:06:55 2019 (r351001, copy of r351000, head/sys/sys/sun_disklabel.h) @@ -0,0 +1,125 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 2004,2005 Joerg Wunsch + * + * This software was developed by the Computer Systems Engineering group + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and + * contributed to Berkeley. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)sun_disklabel.h 8.1 (Berkeley) 6/11/93 + * $NetBSD: disklabel.h,v 1.2 1998/08/22 14:55:28 mrg Exp $ + * + * $FreeBSD$ + */ + +#ifndef _SYS_SUN_DISKLABEL_H_ +#define _SYS_SUN_DISKLABEL_H_ + +/* + * SunOS/Solaris disk label layout (partial). + * + * Suns disk label format contains a lot of historical baggage which we + * ignore entirely. The structure below contains the relevant bits and the + * _enc/_dec functions encode/decode only these fields. + */ + +#define SUN_DKMAGIC 55998 +#define SUN_NPART 8 +#define SUN_RAWPART 2 +#define SUN_SIZE 512 +#define SUN_VTOC_VERSION 1 +#define SUN_VTOC_SANE 0x600DDEEE /* SVR4-compatible VTOC is "sane". */ +#define SUN_VOLNAME_LEN 8 +/* + * XXX: I am actually not sure if this should be "16 sectors" or "8192 bytes". + * XXX: Considering that Sun went to the effort of getting 512 byte compatible + * XXX: CDROM drives produced my guess is that Sun computers stand little or + * XXX: even no chance of running, much less booting on !=512 byte media. + * XXX: Define this is in terms of bytes since that is easier for us. + */ +#define SUN_BOOTSIZE 8192 + +/* partition info */ +struct sun_dkpart { + u_int32_t sdkp_cyloffset; /* starting cylinder */ + u_int32_t sdkp_nsectors; /* number of sectors */ +}; + +struct sun_vtoc_info { + u_int16_t svtoc_tag; /* partition tag */ + u_int16_t svtoc_flag; /* partition flags */ +}; + +/* known partition tag values */ +#define VTOC_UNASSIGNED 0x00 +#define VTOC_BOOT 0x01 +#define VTOC_ROOT 0x02 +#define VTOC_SWAP 0x03 +#define VTOC_USR 0x04 +#define VTOC_BACKUP 0x05 /* "c" partition, covers entire disk */ +#define VTOC_STAND 0x06 +#define VTOC_VAR 0x07 +#define VTOC_HOME 0x08 +#define VTOC_ALTSCTR 0x09 /* alternate sector partition */ +#define VTOC_CACHE 0x0a /* Solaris cachefs partition */ +#define VTOC_VXVM_PUB 0x0e /* VxVM public region */ +#define VTOC_VXVM_PRIV 0x0f /* VxVM private region */ + +/* VTOC partition flags */ +#define VTOC_UNMNT 0x01 /* unmountable partition */ +#define VTOC_RONLY 0x10 /* partition is read/only */ + +struct sun_disklabel { + char sl_text[128]; + + /* SVR4 VTOC information */ + u_int32_t sl_vtoc_vers; /* == SUN_VTOC_VERSION */ + char sl_vtoc_volname[SUN_VOLNAME_LEN]; + u_int16_t sl_vtoc_nparts; /* == SUN_NPART */ + struct sun_vtoc_info sl_vtoc_map[SUN_NPART]; /* partition tag/flag */ + u_int32_t sl_vtoc_sane; /* == SUN_VTOC_SANE */ + + /* Sun label information */ + u_int16_t sl_rpm; /* rotational speed */ + u_int16_t sl_pcylinders; /* number of physical cyls */ + u_int16_t sl_sparespercyl; /* spare sectors per cylinder */ + u_int16_t sl_interleave; /* interleave factor */ + u_int16_t sl_ncylinders; /* data cylinders */ + u_int16_t sl_acylinders; /* alternate cylinders */ + u_int16_t sl_ntracks; /* tracks per cylinder */ + u_int16_t sl_nsectors; /* sectors per track */ + struct sun_dkpart sl_part[SUN_NPART]; /* partition layout */ + u_int16_t sl_magic; /* == SUN_DKMAGIC */ +}; + +int sunlabel_dec(void const *pp, struct sun_disklabel *sl); +void sunlabel_enc(void *pp, struct sun_disklabel *sl); + +#endif /* _SYS_SUN_DISKLABEL_H_ */ Modified: head/sbin/sunlabel/sunlabel.c ============================================================================== --- head/sbin/sunlabel/sunlabel.c Tue Aug 13 19:39:36 2019 (r351000) +++ head/sbin/sunlabel/sunlabel.c Tue Aug 13 20:06:55 2019 (r351001) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -88,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include "sun_disklabel.h" #define _PATH_TMPFILE "/tmp/EdDk.XXXXXXXXXX" #define _PATH_BOOT "/boot/boot1" Copied and modified: head/sbin/sunlabel/sunlabel_enc.c (from r351000, head/sys/geom/geom_sunlabel_enc.c) ============================================================================== --- head/sys/geom/geom_sunlabel_enc.c Tue Aug 13 19:39:36 2019 (r351000, copy source) +++ head/sbin/sunlabel/sunlabel_enc.c Tue Aug 13 20:06:55 2019 (r351001) @@ -39,12 +39,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef _KERNEL #include #else #include #endif +#include "sun_disklabel.h" #define SL_TEXT 0x0 #define SL_TEXT_SIZEOF 0x80 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Aug 13 19:39:36 2019 (r351000) +++ head/share/man/man4/Makefile Tue Aug 13 20:06:55 2019 (r351001) @@ -166,7 +166,6 @@ MAN= aac.4 \ gdb.4 \ gem.4 \ geom.4 \ - geom_fox.4 \ geom_linux_lvm.4 \ geom_map.4 \ geom_uzip.4 \ Modified: head/share/man/man4/geom.4 ============================================================================== --- head/share/man/man4/geom.4 Tue Aug 13 19:39:36 2019 (r351000) +++ head/share/man/man4/geom.4 Tue Aug 13 20:06:55 2019 (r351001) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2018 +.Dd August 13, 2019 .Dt GEOM 4 .Os .Sh NAME @@ -443,24 +443,6 @@ This is unused at this time. .It 0x80 Pq Dv G_F_CTLDUMP Dump contents of gctl requests. .El -.Sh OBSOLETE OPTIONS -.Pp -The following options have been deprecated and will be removed in -.Fx 12 : -.Cd GEOM_BSD , -.Cd GEOM_FOX , -.Cd GEOM_MBR , -.Cd GEOM_SUNLABEL , -and -.Cd GEOM_VOL . -.Pp -Use -.Cd GEOM_PART_BSD , -.Cd GEOM_MULTIPATH , -.Cd GEOM_PART_MBR , -.Cd GEOM_PART_VTOC8 , -.Cd GEOM_LABEL -options, respectively, instead. .Sh SEE ALSO .Xr libgeom 3 , .Xr DECLARE_GEOM_CLASS 9 , @@ -475,7 +457,7 @@ options, respectively, instead. .Xr g_provider 9 , .Xr g_provider_by_name 9 .Sh HISTORY -This software was developed for the +This software was initially developed for the .Fx Project by .An Poul-Henning Kamp @@ -485,13 +467,38 @@ under DARPA/SPAWAR contract N66001-01-C-8035 as part of the DARPA CHATS research program. .Pp -The first precursor for +The following obsolete .Nm -was a gruesome hack to Minix 1.2 and was -never distributed. -An earlier attempt to implement a less general scheme -in -.Fx -never succeeded. +components were removed in +.Fx 13.0 : +.Bl -bullet -offset indent -compact +.It +.Cd GEOM_BSD , +.It +.Cd GEOM_FOX , +.It +.Cd GEOM_MBR , +.It +.Cd GEOM_SUNLABEL , +and +.It +.Cd GEOM_VOL . +.El +.Pp +Use +.Bl -bullet -offset indent -compact +.It +.Cd GEOM_PART_BSD , +.It +.Cd GEOM_MULTIPATH , +.It +.Cd GEOM_PART_MBR , +.It +.Cd GEOM_PART_VTOC8 , +and +.It +.Cd GEOM_LABEL +.El +options, respectively, instead. .Sh AUTHORS .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Aug 13 19:39:36 2019 (r351000) +++ head/sys/conf/NOTES Tue Aug 13 20:06:55 2019 (r351001) @@ -156,17 +156,14 @@ options BOOT_TAG=\"\" options BOOT_TAG_SZ=32 options GEOM_BDE # Disk encryption. -options GEOM_BSD # BSD disklabels (obsolete, gone in 12) options GEOM_CACHE # Disk cache. options GEOM_CONCAT # Disk concatenation. options GEOM_ELI # Disk encryption. -options GEOM_FOX # Redundant path mitigation (obsolete, gone in 12) options GEOM_GATE # Userland services. options GEOM_JOURNAL # Journaling. options GEOM_LABEL # Providers labelization. options GEOM_LINUX_LVM # Linux LVM2 volumes options GEOM_MAP # Map based partitioning -options GEOM_MBR # DOS/MBR partitioning (obsolete, gone in 12) options GEOM_MIRROR # Disk mirroring. options GEOM_MULTIPATH # Disk multipath options GEOM_NOP # Test class. @@ -183,11 +180,9 @@ options GEOM_RAID # Soft RAID functionality. options GEOM_RAID3 # RAID3 functionality. options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. -options GEOM_SUNLABEL # Sun/Solaris partitioning (obsolete, gone in 12) options GEOM_UZIP # Read-only compressed disks options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. -options GEOM_VOL # Volume names from UFS superblock (obsolete, gone in 12) options GEOM_ZERO # Performance testing helper. # @@ -1260,8 +1255,7 @@ options FFCLOCK # removed a disk drive, you may have had to rewrite your /etc/fstab # file, and also that you had to be careful when adding a new disk # as it may have been probed earlier and moved your device configuration -# around. (See also option GEOM_VOL for a different solution to this -# problem.) +# around. # This old behavior is maintained as the default behavior. The unit # assignment begins with the first non-wired down unit for a device Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Aug 13 19:39:36 2019 (r351000) +++ head/sys/conf/files Tue Aug 13 20:06:55 2019 (r351001) @@ -3561,28 +3561,21 @@ geom/eli/g_eli_key_cache.c optional geom_eli geom/eli/g_eli_privacy.c optional geom_eli geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate -geom/geom_bsd.c optional geom_bsd -geom/geom_bsd_enc.c optional geom_bsd | geom_part_bsd +geom/geom_bsd_enc.c optional geom_part_bsd geom/geom_ccd.c optional ccd | geom_ccd geom/geom_ctl.c standard geom/geom_dev.c standard geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard -geom/geom_fox.c optional geom_fox geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map -geom/geom_mbr.c optional geom_mbr -geom/geom_mbr_enc.c optional geom_mbr geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard -geom/geom_sunlabel.c optional geom_sunlabel -geom/geom_sunlabel_enc.c optional geom_sunlabel geom/geom_vfs.c standard -geom/geom_vol_ffs.c optional geom_vol geom/journal/g_journal.c optional geom_journal geom/journal/g_journal_ufs.c optional geom_journal geom/label/g_label.c optional geom_label | geom_label_gpt Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Aug 13 19:39:36 2019 (r351000) +++ head/sys/conf/options Tue Aug 13 20:06:55 2019 (r351001) @@ -106,18 +106,15 @@ GZIO opt_gzio.h IMAGACT_BINMISC opt_dontuse.h IPI_PREEMPTION opt_sched.h GEOM_BDE opt_geom.h -GEOM_BSD opt_geom.h GEOM_CACHE opt_geom.h GEOM_CONCAT opt_geom.h GEOM_ELI opt_geom.h -GEOM_FOX opt_geom.h GEOM_GATE opt_geom.h GEOM_JOURNAL opt_geom.h GEOM_LABEL opt_geom.h GEOM_LABEL_GPT opt_geom.h GEOM_LINUX_LVM opt_geom.h GEOM_MAP opt_geom.h -GEOM_MBR opt_geom.h GEOM_MIRROR opt_geom.h GEOM_MOUNTVER opt_geom.h GEOM_MULTIPATH opt_geom.h @@ -135,12 +132,10 @@ GEOM_RAID opt_geom.h GEOM_RAID3 opt_geom.h GEOM_SHSEC opt_geom.h GEOM_STRIPE opt_geom.h -GEOM_SUNLABEL opt_geom.h GEOM_UZIP opt_geom.h GEOM_UZIP_DEBUG opt_geom.h GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h -GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h IFLIB opt_iflib.h KDTRACE_HOOKS opt_global.h Modified: head/sys/sys/diskmbr.h ============================================================================== --- head/sys/sys/diskmbr.h Tue Aug 13 19:39:36 2019 (r351000) +++ head/sys/sys/diskmbr.h Tue Aug 13 20:06:55 2019 (r351001) @@ -38,9 +38,6 @@ #include #include -void dos_partition_dec(void const *pp, struct dos_partition *d); -void dos_partition_enc(void *pp, struct dos_partition *d); - #define DIOCSMBR _IOW('M', 129, u_char[512]) #endif /* !_SYS_DISKMBR_H_ */ Modified: head/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.c Tue Aug 13 19:39:36 2019 (r351000) +++ head/usr.sbin/boot0cfg/boot0cfg.c Tue Aug 13 20:06:55 2019 (r351001) @@ -426,16 +426,6 @@ write_mbr(const char *fname, int flags, u_int8_t *mbr, errx(1, "GEOM_PART: write bootcode to %s failed: %s", fname, errmsg); gctl_free(grq); - } else if (geom_class_available("MBR") != 0) { - grq = gctl_get_handle(); - gctl_ro_param(grq, "verb", -1, "write MBR"); - gctl_ro_param(grq, "class", -1, "MBR"); - gctl_ro_param(grq, "geom", -1, pname); - gctl_ro_param(grq, "data", mbr_size, mbr); - errmsg = gctl_issue(grq); - if (errmsg != NULL) - err(1, "GEOM_MBR: write MBR to %s failed", fname); - gctl_free(grq); } else errx(1, "can't write MBR to %s", fname); free(pname); From owner-svn-src-head@freebsd.org Tue Aug 13 20:56:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B804BCC08; Tue, 13 Aug 2019 20:56:45 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Q4Y2dLvz4Py2; Tue, 13 Aug 2019 20:56:45 +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 1F5E11D5C3; Tue, 13 Aug 2019 20:56:45 +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 x7DKui8m010715; Tue, 13 Aug 2019 20:56:44 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DKui5t010714; Tue, 13 Aug 2019 20:56:44 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201908132056.x7DKui5t010714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 13 Aug 2019 20:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351002 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 351002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 20:56:45 -0000 Author: mckusick Date: Tue Aug 13 20:56:44 2019 New Revision: 351002 URL: https://svnweb.freebsd.org/changeset/base/351002 Log: Clarify comment that describes how the FS_METACKHASH is managed. MFC after: 3 days Modified: head/sys/ufs/ffs/fs.h Modified: head/sys/ufs/ffs/fs.h ============================================================================== --- head/sys/ufs/ffs/fs.h Tue Aug 13 20:06:55 2019 (r351001) +++ head/sys/ufs/ffs/fs.h Tue Aug 13 20:56:44 2019 (r351002) @@ -409,22 +409,27 @@ CTASSERT(sizeof(struct fs) == 1376); * The FS_UNCLEAN flag is set by the kernel when the filesystem was * mounted with fs_clean set to zero. The FS_DOSOFTDEP flag indicates * that the filesystem should be managed by the soft updates code. - * Note that the FS_NEEDSFSCK flag is set and cleared only by the - * fsck utility. It is set when background fsck finds an unexpected + * Note that the FS_NEEDSFSCK flag is set and cleared by the fsck + * utility. It is set when background fsck finds an unexpected * inconsistency which requires a traditional foreground fsck to be * run. Such inconsistencies should only be found after an uncorrectable - * disk error. A foreground fsck will clear the FS_NEEDSFSCK flag when - * it has successfully cleaned up the filesystem. The kernel uses this + * disk error. The FS_NEEDSFSCK can also be set when a mounted filesystem + * discovers an internal inconsistency such as freeing a freed inode. + * A foreground fsck will clear the FS_NEEDSFSCK flag when it has + * successfully cleaned up the filesystem. The kernel uses this * flag to enforce that inconsistent filesystems be mounted read-only. - * The FS_INDEXDIRS flag when set indicates that the kernel maintains - * on-disk auxiliary indexes (such as B-trees) for speeding directory - * accesses. Kernels that do not support auxiliary indices clear the - * flag to indicate that the indices need to be rebuilt (by fsck) before - * they can be used. When a filesystem is mounted, any flags not - * included in FS_SUPPORTED are cleared. This lets newer features - * know that the filesystem has been run on an older version of the - * filesystem and thus that data structures associated with those - * features are out-of-date and need to be rebuilt. + * + * The FS_METACKHASH flag when set indicates that the kernel maintains + * one or more check hashes. The actual set of supported check hashes + * is stored in the fs_metackhash field. Kernels that do not support + * check hashes clear the FS_METACKHASH flag to indicate that the + * check hashes need to be rebuilt (by fsck) before they can be used. + * + * When a filesystem is mounted, any flags not included in FS_SUPPORTED + * are cleared. This lets newer features know that the filesystem has + * been run on an older version of the filesystem and thus that data + * structures associated with those features are out-of-date and need + * to be rebuilt. * * FS_ACLS indicates that POSIX.1e ACLs are administratively enabled * for the file system, so they should be loaded from extended attributes, From owner-svn-src-head@freebsd.org Tue Aug 13 21:15:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAE34BD2D4; Tue, 13 Aug 2019 21:15:59 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467QVl5QRHz4R0r; Tue, 13 Aug 2019 21:15:59 +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 972641D966; Tue, 13 Aug 2019 21:15:59 +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 x7DLFxvQ021952; Tue, 13 Aug 2019 21:15:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DLFxHl021951; Tue, 13 Aug 2019 21:15:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201908132115.x7DLFxHl021951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 13 Aug 2019 21:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351003 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 351003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 21:15:59 -0000 Author: jhb Date: Tue Aug 13 21:15:59 2019 New Revision: 351003 URL: https://svnweb.freebsd.org/changeset/base/351003 Log: Fix build with DRM and INVARIANTS enabled. The DRM drivers use the lockdep assertion macros with spinlock_t locks which are backed by mutexes, not sx locks. This causes compile failures since you can't use sx_assert with a mutex. Instead, change the lockdep macros to use lock_class methods. This works by assuming that each LinuxKPI locking primitive embeds a FreeBSD lock as its first structure and uses a cast to get to the underlying 'struct lock_object'. Reviewed by: hselasky MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20992 Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Aug 13 20:56:44 2019 (r351002) +++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Aug 13 21:15:59 2019 (r351003) @@ -40,13 +40,34 @@ struct lock_class_key { #define lockdep_set_current_reclaim_state(g) do { } while (0) #define lockdep_clear_current_reclaim_state() do { } while (0) -#define lockdep_assert_held(m) \ - sx_assert(&(m)->sx, SA_XLOCKED) +#ifdef INVARIANTS +#define lockdep_assert_held(m) do { \ + struct lock_object *__lock = (struct lock_object *)(m); \ + LOCK_CLASS(__lock)->lc_assert(__lock, LA_LOCKED); \ +} while (0) -#define lockdep_assert_held_once(m) \ - sx_assert(&(m)->sx, SA_XLOCKED | SA_NOTRECURSED) +#define lockdep_assert_held_once(m) do { \ + struct lock_object *__lock = (struct lock_object *)(m); \ + LOCK_CLASS(__lock)->lc_assert(__lock, LA_LOCKED | LA_NOTRECURSED); \ +} while (0) -#define lockdep_is_held(m) (sx_xholder(&(m)->sx) == curthread) +static __inline bool +lockdep_is_held(void *__m) +{ + struct lock_object *__lock; + struct thread *__td; + + __lock = __m; + return (LOCK_CLASS(__lock)->lc_owner(__lock, &__td) != 0); +} + +#else +#define lockdep_assert_held(m) do { } while (0) + +#define lockdep_assert_held_once(m) do { } while (0) + +#define lockdep_is_held(m) 1 +#endif #define might_lock(m) do { } while (0) #define might_lock_read(m) do { } while (0) From owner-svn-src-head@freebsd.org Tue Aug 13 21:49:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B9C1BE3E1; Tue, 13 Aug 2019 21:49:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467RF02XVZz4ShB; Tue, 13 Aug 2019 21:49:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 340FB1DEE5; Tue, 13 Aug 2019 21:49:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7DLn8Ij039949; Tue, 13 Aug 2019 21:49:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DLn8vh039948; Tue, 13 Aug 2019 21:49:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908132149.x7DLn8vh039948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 13 Aug 2019 21:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351004 - head/sys/dev/nvd X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvd X-SVN-Commit-Revision: 351004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 21:49:08 -0000 Author: mav Date: Tue Aug 13 21:49:07 2019 New Revision: 351004 URL: https://svnweb.freebsd.org/changeset/base/351004 Log: Make nvd(4) report NGUID or EUI64 as GEOM::lunid. With support for multiple namespaces and multiple ports in NVMe there is now a need for reliable unique namespace identification alike to SCSI. MFC after: 1 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/dev/nvd/nvd.c Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Tue Aug 13 21:15:59 2019 (r351003) +++ head/sys/dev/nvd/nvd.c Tue Aug 13 21:49:07 2019 (r351004) @@ -54,6 +54,7 @@ struct nvd_controller; static disk_ioctl_t nvd_ioctl; static disk_strategy_t nvd_strategy; static dumper_t nvd_dump; +static disk_getattr_t nvd_getattr; static void nvd_done(void *arg, const struct nvme_completion *cpl); static void nvd_gone(struct nvd_disk *ndisk); @@ -294,6 +295,47 @@ nvd_dump(void *arg, void *virt, vm_offset_t phys, off_ return (nvme_ns_dump(ndisk->ns, virt, offset, len)); } +static int +nvd_getattr(struct bio *bp) +{ + struct nvd_disk *ndisk = (struct nvd_disk *)bp->bio_disk->d_drv1; + const struct nvme_namespace_data *nsdata; + u_int i; + + if (!strcmp("GEOM::lunid", bp->bio_attribute)) { + nsdata = nvme_ns_get_data(ndisk->ns); + + /* Try to return NGUID as lunid. */ + for (i = 0; i < sizeof(nsdata->nguid); i++) + if (nsdata->nguid[i] != 0) + if (i < sizeof(nsdata->nguid)) { + if (bp->bio_length < sizeof(nsdata->nguid) * 2 + 1) + return (EFAULT); + for (i = 0; i < sizeof(nsdata->nguid); i++) { + sprintf(&bp->bio_data[i * 2], "%02x", + nsdata->nguid[i]); + } + bp->bio_completed = bp->bio_length; + return (0); + } + + /* Try to return EUI64 as lunid. */ + for (i = 0; i < sizeof(nsdata->eui64); i++) + if (nsdata->eui64[i] != 0) + if (i < sizeof(nsdata->eui64)) { + if (bp->bio_length < sizeof(nsdata->eui64) * 2 + 1) + return (EFAULT); + for (i = 0; i < sizeof(nsdata->eui64); i++) { + sprintf(&bp->bio_data[i * 2], "%02x", + nsdata->eui64[i]); + } + bp->bio_completed = bp->bio_length; + return (0); + } + } + return (-1); +} + static void nvd_done(void *arg, const struct nvme_completion *cpl) { @@ -403,6 +445,7 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_ar disk->d_strategy = nvd_strategy; disk->d_ioctl = nvd_ioctl; disk->d_dump = nvd_dump; + disk->d_getattr = nvd_getattr; disk->d_gone = nvd_gonecb; disk->d_name = NVD_STR; disk->d_unit = ndisk->unit; From owner-svn-src-head@freebsd.org Tue Aug 13 23:33:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC64FC0E95; Tue, 13 Aug 2019 23:33:00 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467TXr6Tzzz4Yl9; Tue, 13 Aug 2019 23:33:00 +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 BFE241F2B4; Tue, 13 Aug 2019 23:33:00 +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 x7DNX0PH011581; Tue, 13 Aug 2019 23:33:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7DNWvZq011532; Tue, 13 Aug 2019 23:32:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908132332.x7DNWvZq011532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 13 Aug 2019 23:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351005 - in head: share/man/man4 sys/conf sys/geom/uzip sys/modules/geom/geom_uzip usr.bin/mkuzip X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: share/man/man4 sys/conf sys/geom/uzip sys/modules/geom/geom_uzip usr.bin/mkuzip X-SVN-Commit-Revision: 351005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 13 Aug 2019 23:33:01 -0000 Author: cem Date: Tue Aug 13 23:32:56 2019 New Revision: 351005 URL: https://svnweb.freebsd.org/changeset/base/351005 Log: geom_uzip(4), mkuzip(8): Add Zstd image mode The Zstd format bumps the CLOOP major number to 4 to avoid incompatibility with older systems. Support in geom_uzip(4) is conditional on the ZSTDIO kernel option, which is enabled in amd64 GENERIC, but not all in-tree configurations. mkuzip(8) was modified slightly to always initialize the nblocks + 1'th offset in the CLOOP file format. Previously, it was only initialized in the case where the final compressed block happened to be unaligned w.r.t. DEV_BSIZE. The "Fake" last+1 block change in r298619 means that the final compressed block's 'blen' was never correct unless the compressed uzip image happened to be BSIZE-aligned. This happened in about 1 out of every 512 cases. The zlib and lzma decompressors are probably tolerant of extra trash following the frame they were told to decode, but Zstd complains that the input size is incorrect. Correspondingly, geom_uzip(4) was modified slightly to avoid trashing the nblocks + 1'th offset when it is known to be initialized to a good value. This corrects the calculated final real cluster compressed length to match that printed by mkuzip(8). mkuzip(8) was refactored somewhat to reduce code duplication and increase ease of adding other compression formats. * Input block size validation was pulled out of individual compression init routines into main(). * Init routines now validate a user-provided compression level or select an algorithm-specific default, if none was provided. * A new interface for calculating the maximal compressed size of an incompressible input block was added for each driver. The generic code uses it to validate against MAXPHYS as well as to allocate compression result buffers in the generic code. * Algorithm selection is now driven by a table lookup, to increase ease of adding other formats in the future. mkuzip(8) gained the ability to explicitly specify a compression level with '-C'. The prior defaults -- 9 for zlib and 6 for lzma -- are maintained. The new zstd default is 9, to match zlib. Rather than select lzma or zlib with '-L' or its absense, respectively, a new argument '-A ' is provided to select 'zlib', 'lzma', or 'zstd'. '-L' is considered deprecated, but will probably never be removed. All of the new features were documented in mkuzip.8; the page was also cleaned up slightly. Relnotes: yes Added: head/sys/geom/uzip/g_uzip_zstd.c (contents, props changed) head/sys/geom/uzip/g_uzip_zstd.h (contents, props changed) head/usr.bin/mkuzip/mkuz_zstd.c (contents, props changed) head/usr.bin/mkuzip/mkuz_zstd.h (contents, props changed) Modified: head/share/man/man4/geom_uzip.4 head/sys/conf/NOTES head/sys/conf/files head/sys/geom/uzip/g_uzip.c head/sys/geom/uzip/g_uzip_cloop.h head/sys/modules/geom/geom_uzip/Makefile head/usr.bin/mkuzip/Makefile head/usr.bin/mkuzip/mkuz_cfg.h head/usr.bin/mkuzip/mkuz_cloop.h head/usr.bin/mkuzip/mkuz_conveyor.c head/usr.bin/mkuzip/mkuz_format.h head/usr.bin/mkuzip/mkuz_lzma.c head/usr.bin/mkuzip/mkuz_lzma.h head/usr.bin/mkuzip/mkuz_zlib.c head/usr.bin/mkuzip/mkuz_zlib.h head/usr.bin/mkuzip/mkuzip.8 head/usr.bin/mkuzip/mkuzip.c head/usr.bin/mkuzip/mkuzip.h Modified: head/share/man/man4/geom_uzip.4 ============================================================================== --- head/share/man/man4/geom_uzip.4 Tue Aug 13 21:49:07 2019 (r351004) +++ head/share/man/man4/geom_uzip.4 Tue Aug 13 23:32:56 2019 (r351005) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2019 +.Dd August 13, 2019 .Dt GEOM_UZIP 4 .Os .Sh NAME @@ -37,6 +37,7 @@ place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device xz" +.Cd "options zstd" .Cd "options GEOM_UZIP" .Ed .Pp @@ -163,6 +164,9 @@ Log operations involving compressed cluster number. .Xr md 4 , .Xr geom 8 , .Xr mkuzip 8 +.Sh HISTORY +Zstd support was added in +.Fx 13.0 . .Sh AUTHORS .An -nosplit The Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Aug 13 21:49:07 2019 (r351004) +++ head/sys/conf/NOTES Tue Aug 13 23:32:56 2019 (r351005) @@ -2853,8 +2853,8 @@ options IMAGACT_BINMISC # This enables support for compressed core dumps. options GZIO -# zstd I/O stream support -# This enables support for Zstd compressed core dumps. +# zstd support +# This enables support for Zstd compressed core dumps and GEOM_UZIP images. options ZSTDIO # BHND(4) drivers Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Aug 13 21:49:07 2019 (r351004) +++ head/sys/conf/files Tue Aug 13 23:32:56 2019 (r351005) @@ -3627,6 +3627,8 @@ geom/uzip/g_uzip.c optional geom_uzip geom/uzip/g_uzip_lzma.c optional geom_uzip geom/uzip/g_uzip_wrkthr.c optional geom_uzip geom/uzip/g_uzip_zlib.c optional geom_uzip +geom/uzip/g_uzip_zstd.c optional geom_uzip zstdio \ + compile-with "${NORMAL_C} -I$S/contrib/zstd/lib/freebsd" geom/vinum/geom_vinum.c optional geom_vinum geom/vinum/geom_vinum_create.c optional geom_vinum geom/vinum/geom_vinum_drive.c optional geom_vinum Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Tue Aug 13 21:49:07 2019 (r351004) +++ head/sys/geom/uzip/g_uzip.c Tue Aug 13 23:32:56 2019 (r351005) @@ -31,6 +31,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_geom.h" +#include "opt_zstdio.h" + #include #include #include @@ -51,10 +54,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef ZSTDIO +#include +#endif #include -#include "opt_geom.h" - MALLOC_DEFINE(M_GEOM_UZIP, "geom_uzip", "GEOM UZIP data structures"); FEATURE(geom_uzip, "GEOM read-only compressed disks support"); @@ -594,7 +598,7 @@ g_uzip_parse_toc(struct g_uzip_softc *sc, struct g_pro * block whose offset is larger than ours and assume * it's going to be the next one. */ - for (j = i + 1; j < sc->nblocks; j++) { + for (j = i + 1; j < sc->nblocks + 1; j++) { if (sc->toc[j].offset > max_offset) { break; } @@ -664,8 +668,10 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp struct g_uzip_softc *sc; enum { G_UZIP = 1, - G_ULZMA + G_ULZMA, + G_ZSTD, } type; + char cloop_version; g_trace(G_T_TOPOLOGY, "%s(%s,%s)", __func__, mp->name, pp->name); g_topology_assert(); @@ -712,11 +718,12 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp goto e3; } + cloop_version = header->magic[CLOOP_OFS_VERSN]; switch (header->magic[CLOOP_OFS_COMPR]) { case CLOOP_COMP_LZMA: case CLOOP_COMP_LZMA_DDP: type = G_ULZMA; - if (header->magic[CLOOP_OFS_VERSN] < CLOOP_MINVER_LZMA) { + if (cloop_version < CLOOP_MINVER_LZMA) { DPRINTF(GUZ_DBG_ERR, ("%s: image version too old\n", gp->name)); goto e3; @@ -727,7 +734,7 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp case CLOOP_COMP_LIBZ: case CLOOP_COMP_LIBZ_DDP: type = G_UZIP; - if (header->magic[CLOOP_OFS_VERSN] < CLOOP_MINVER_ZLIB) { + if (cloop_version < CLOOP_MINVER_ZLIB) { DPRINTF(GUZ_DBG_ERR, ("%s: image version too old\n", gp->name)); goto e3; @@ -735,6 +742,24 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp DPRINTF(GUZ_DBG_INFO, ("%s: GEOM_UZIP_ZLIB image found\n", gp->name)); break; + case CLOOP_COMP_ZSTD: + case CLOOP_COMP_ZSTD_DDP: + if (cloop_version < CLOOP_MINVER_ZSTD) { + DPRINTF(GUZ_DBG_ERR, ("%s: image version too old\n", + gp->name)); + goto e3; + } +#ifdef ZSTDIO + DPRINTF(GUZ_DBG_INFO, ("%s: GEOM_UZIP_ZSTD image found.\n", + gp->name)); + type = G_ZSTD; +#else + DPRINTF(GUZ_DBG_ERR, ("%s: GEOM_UZIP_ZSTD image found, but " + "this kernel was configured with Zstd disabled.\n", + gp->name)); + goto e3; +#endif + break; default: DPRINTF(GUZ_DBG_ERR, ("%s: unsupported image type\n", gp->name)); @@ -774,6 +799,13 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp } DPRINTF(GUZ_DBG_INFO, ("%s: %u offsets in the first sector\n", gp->name, offsets_read)); + + /* + * The following invalidates the "header" pointer into the first + * block's "buf." + */ + header = NULL; + for (blk = 1; offsets_read < total_offsets; blk++) { uint32_t nread; @@ -805,20 +837,41 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp goto e5; } - if (type == G_UZIP) { + switch (type) { + case G_UZIP: sc->dcp = g_uzip_zlib_ctor(sc->blksz); - } else { + break; + case G_ULZMA: sc->dcp = g_uzip_lzma_ctor(sc->blksz); - } - if (sc->dcp == NULL) { + break; +#ifdef ZSTDIO + case G_ZSTD: + sc->dcp = g_uzip_zstd_ctor(sc->blksz); + break; +#endif + default: goto e5; } /* - * "Fake" last+1 block, to make it easier for the TOC parser to - * iterate without making the last element a special case. + * The last+1 block was not always initialized by earlier versions of + * mkuzip(8). However, *if* it is initialized, the difference between + * its offset and the prior block's offset represents the length of the + * final real compressed block, and this is significant to the + * decompressor. */ - sc->toc[sc->nblocks].offset = pp->mediasize; + if (cloop_version >= CLOOP_MINVER_RELIABLE_LASTBLKSZ && + sc->toc[sc->nblocks].offset != 0) { + if (sc->toc[sc->nblocks].offset > pp->mediasize) { + DPRINTF(GUZ_DBG_ERR, + ("%s: bogus n+1 offset %ju > mediasize %ju\n", + gp->name, (uintmax_t)sc->toc[sc->nblocks].offset, + (uintmax_t)pp->mediasize)); + goto e6; + } + } else { + sc->toc[sc->nblocks].offset = pp->mediasize; + } /* Massage TOC (table of contents), make sure it is sound */ if (g_uzip_parse_toc(sc, pp, gp) != 0) { DPRINTF(GUZ_DBG_ERR, ("%s: TOC error\n", gp->name)); Modified: head/sys/geom/uzip/g_uzip_cloop.h ============================================================================== --- head/sys/geom/uzip/g_uzip_cloop.h Tue Aug 13 21:49:07 2019 (r351004) +++ head/sys/geom/uzip/g_uzip_cloop.h Tue Aug 13 23:32:56 2019 (r351005) @@ -39,14 +39,20 @@ #define CLOOP_MAJVER_2 '2' #define CLOOP_MAJVER_3 '3' +#define CLOOP_MAJVER_4 '4' #define CLOOP_COMP_LIBZ 'V' #define CLOOP_COMP_LIBZ_DDP 'v' #define CLOOP_COMP_LZMA 'L' #define CLOOP_COMP_LZMA_DDP 'l' +#define CLOOP_COMP_ZSTD 'Z' +#define CLOOP_COMP_ZSTD_DDP 'z' #define CLOOP_MINVER_LZMA CLOOP_MAJVER_3 #define CLOOP_MINVER_ZLIB CLOOP_MAJVER_2 +#define CLOOP_MINVER_ZSTD CLOOP_MAJVER_4 + +#define CLOOP_MINVER_RELIABLE_LASTBLKSZ CLOOP_MAJVER_4 struct cloop_header { char magic[CLOOP_MAGIC_LEN]; /* cloop magic */ Added: head/sys/geom/uzip/g_uzip_zstd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/uzip/g_uzip_zstd.c Tue Aug 13 23:32:56 2019 (r351005) @@ -0,0 +1,157 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Conrad Meyer + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* + * We don't actually need any static-link ABI, just want to use "experimental" + * custom malloc/free APIs. + */ +#define ZSTD_STATIC_LINKING_ONLY +#include + +FEATURE(geom_uzip_zstd, "g_uzip Zstd support"); + +struct g_uzip_zstd { + struct g_uzip_dapi guz_pub; + uint32_t guz_blksz; + ZSTD_DCtx *guz_dctx; +}; + +#ifndef container_of +#define container_of(ptr, type, member) \ +({ \ + const __typeof(((type *)0)->member) *__p = (ptr); \ + (type *)((uintptr_t)__p - offsetof(type, member)); \ +}) +#endif +#define to_zstd_softc(zpp) container_of(zpp, struct g_uzip_zstd, guz_pub) + +static int +guz_zstd_decompress(struct g_uzip_dapi *zpp, const char *gp_name, void *input, + size_t ilen, void *outputbuf) +{ + struct g_uzip_zstd *sc; + size_t rc; + + sc = to_zstd_softc(zpp); + rc = ZSTD_decompressDCtx(sc->guz_dctx, outputbuf, sc->guz_blksz, input, + ilen); + if (ZSTD_isError(rc)) { + printf("%s: UZIP(zstd) decompress failed: %s\n", gp_name, + ZSTD_getErrorName(rc)); + return (EIO); + } + KASSERT(rc == sc->guz_blksz, ("%s: Expected %u bytes, got %zu", + __func__, sc->guz_blksz, rc)); + return (0); +} + +static void +guz_zstd_free(struct g_uzip_dapi *zpp) +{ + struct g_uzip_zstd *sc; + size_t rc; + + sc = to_zstd_softc(zpp); + rc = ZSTD_freeDCtx(sc->guz_dctx); + if (ZSTD_isError(rc)) + printf("%s: UZIP(zstd) free failed: %s\n", __func__, + ZSTD_getErrorName(rc)); + + free(sc, M_GEOM_UZIP); +} + +static int +guz_zstd_rewind(struct g_uzip_dapi *zpp, const char *gp_name) +{ + struct g_uzip_zstd *sc; + size_t rc; + + sc = to_zstd_softc(zpp); + rc = ZSTD_DCtx_reset(sc->guz_dctx, ZSTD_reset_session_and_parameters); + if (ZSTD_isError(rc)) { + printf("%s: UZIP(zstd) rewind failed: %s\n", gp_name, + ZSTD_getErrorName(rc)); + return (EIO); + } + return (0); +} + +static void * +zstd_alloc(void *opaque, size_t size) +{ + return (malloc(size, opaque, M_WAITOK)); +} + +static void +zstd_free(void *opaque, void *address) +{ + free(address, opaque); +} + +static const ZSTD_customMem zstd_guz_alloc = { + .customAlloc = zstd_alloc, + .customFree = zstd_free, + .opaque = M_GEOM_UZIP, +}; + +struct g_uzip_dapi * +g_uzip_zstd_ctor(uint32_t blksz) +{ + struct g_uzip_zstd *sc; + + sc = malloc(sizeof(*sc), M_GEOM_UZIP, M_WAITOK | M_ZERO); + + sc->guz_dctx = ZSTD_createDCtx_advanced(zstd_guz_alloc); + if (sc->guz_dctx == NULL) { + printf("%s: ZSTD_createDCtx_advanced failed\n", __func__); + free(sc, M_GEOM_UZIP); + return (NULL); + } + + sc->guz_blksz = blksz; + sc->guz_pub.max_blen = ZSTD_compressBound(blksz); + sc->guz_pub.decompress = guz_zstd_decompress; + sc->guz_pub.free = guz_zstd_free; + sc->guz_pub.rewind = guz_zstd_rewind; + sc->guz_pub.pvt = NULL; + + return (&sc->guz_pub); +} Added: head/sys/geom/uzip/g_uzip_zstd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/uzip/g_uzip_zstd.h Tue Aug 13 23:32:56 2019 (r351005) @@ -0,0 +1,30 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Conrad Meyer + * + * 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$ + */ + +struct g_uzip_dapi *g_uzip_zstd_ctor(uint32_t); Modified: head/sys/modules/geom/geom_uzip/Makefile ============================================================================== --- head/sys/modules/geom/geom_uzip/Makefile Tue Aug 13 21:49:07 2019 (r351004) +++ head/sys/modules/geom/geom_uzip/Makefile Tue Aug 13 23:32:56 2019 (r351005) @@ -6,12 +6,17 @@ KMOD= geom_uzip SRCS= g_uzip.c g_uzip_zlib.c g_uzip_lzma.c g_uzip_wrkthr.c SRCS+= g_uzip.h g_uzip_dapi.h g_uzip_lzma.h g_uzip_zlib.h g_uzip_softc.h \ g_uzip_wrkthr.h -#CFLAGS= -g -DINVARIANT_SUPPORT -DINVARIANTS -.PATH: ${SRCTOP}/sys/net +# This works for buildkernel, but will disable zstd in geom_uzip out of tree. +.if ${KERN_OPTS:MZSTDIO} != "" +SRCS+= g_uzip_zstd.c g_uzip_zstd.h +CFLAGS.g_uzip_zstd.c+= -I${SRCTOP}/sys/contrib/zstd/lib/freebsd +.endif +#CFLAGS= -g -DINVARIANT_SUPPORT -DINVARIANTS + CFLAGS.g_uzip_lzma.c+= -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz/ -SRCS+= opt_geom.h +SRCS+= opt_geom.h opt_zstdio.h .include Modified: head/usr.bin/mkuzip/Makefile ============================================================================== --- head/usr.bin/mkuzip/Makefile Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/Makefile Tue Aug 13 23:32:56 2019 (r351005) @@ -3,10 +3,12 @@ PROG= mkuzip MAN= mkuzip.8 SRCS= mkuzip.c mkuz_blockcache.c mkuz_lzma.c mkuz_zlib.c mkuz_conveyor.c \ - mkuz_blk.c mkuz_fqueue.c mkuz_time.c mkuz_insize.c + mkuz_blk.c mkuz_fqueue.c mkuz_time.c mkuz_insize.c mkuz_zstd.c +CFLAGS+= -I${SRCTOP}/sys/contrib/zstd/lib + #CFLAGS+= -DMKUZ_DEBUG -LIBADD= z md lzma pthread +LIBADD= lzma md pthread z zstd .include Modified: head/usr.bin/mkuzip/mkuz_cfg.h ============================================================================== --- head/usr.bin/mkuzip/mkuz_cfg.h Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_cfg.h Tue Aug 13 23:32:56 2019 (r351005) @@ -39,4 +39,6 @@ struct mkuz_cfg { const char *iname; off_t isize; const struct mkuz_format *handler; + size_t cbound_blksz; + int comp_level; }; Modified: head/usr.bin/mkuzip/mkuz_cloop.h ============================================================================== --- head/usr.bin/mkuzip/mkuz_cloop.h Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_cloop.h Tue Aug 13 23:32:56 2019 (r351005) @@ -39,9 +39,11 @@ #define CLOOP_MAJVER_2 '2' #define CLOOP_MAJVER_3 '3' +#define CLOOP_MAJVER_4 '4' #define CLOOP_COMP_LIBZ 'V' #define CLOOP_COMP_LZMA 'L' +#define CLOOP_COMP_ZSTD 'Z' struct cloop_header { char magic[CLOOP_MAGIC_LEN]; /* cloop magic */ Modified: head/usr.bin/mkuzip/mkuz_conveyor.c ============================================================================== --- head/usr.bin/mkuzip/mkuz_conveyor.c Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_conveyor.c Tue Aug 13 23:32:56 2019 (r351005) @@ -42,8 +42,8 @@ __FBSDID("$FreeBSD$"); #include "mkuz_conveyor.h" #include "mkuz_cfg.h" #include "mkuzip.h" -#include "mkuz_format.h" #include "mkuz_blk.h" +#include "mkuz_format.h" #include "mkuz_fqueue.h" #include "mkuz_blk_chain.h" @@ -67,7 +67,7 @@ cworker(void *p) cfp = cwp->cfp; cvp = cwp->cvp; free(cwp); - c_ctx = cfp->handler->f_init(cfp->blksz); + c_ctx = cfp->handler->f_init(&cfp->comp_level); for (;;) { iblk = mkuz_fqueue_deq(cvp->wrk_queue); if (iblk == MKUZ_BLK_EOF) { @@ -80,7 +80,8 @@ cworker(void *p) /* All zeroes block */ oblk = mkuz_blk_ctor(0); } else { - oblk = cfp->handler->f_compress(c_ctx, iblk); + oblk = mkuz_blk_ctor(cfp->cbound_blksz); + cfp->handler->f_compress(c_ctx, iblk, oblk); if (cfp->en_dedup != 0) { compute_digest(oblk); } Modified: head/usr.bin/mkuzip/mkuz_format.h ============================================================================== --- head/usr.bin/mkuzip/mkuz_format.h Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_format.h Tue Aug 13 23:32:56 2019 (r351005) @@ -26,12 +26,15 @@ * $FreeBSD$ */ -DEFINE_RAW_METHOD(f_init, void *, uint32_t); -DEFINE_RAW_METHOD(f_compress, struct mkuz_blk *, void *, const struct mkuz_blk *); +DEFINE_RAW_METHOD(f_compress_bound, size_t, size_t); +DEFINE_RAW_METHOD(f_init, void *, int *); +DEFINE_RAW_METHOD(f_compress, void, void *, const struct mkuz_blk *, struct mkuz_blk *); struct mkuz_format { + const char *option; const char *magic; const char *default_sufx; + f_compress_bound_t f_compress_bound; f_init_t f_init; f_compress_t f_compress; }; Modified: head/usr.bin/mkuzip/mkuz_lzma.c ============================================================================== --- head/usr.bin/mkuzip/mkuz_lzma.c Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_lzma.c Tue Aug 13 23:32:56 2019 (r351005) @@ -35,61 +35,55 @@ __FBSDID("$FreeBSD$"); #include #include "mkuzip.h" -#include "mkuz_lzma.h" #include "mkuz_blk.h" +#include "mkuz_lzma.h" -#define USED_BLOCKSIZE DEV_BSIZE - struct mkuz_lzma { lzma_filter filters[2]; lzma_options_lzma opt_lzma; lzma_stream strm; - uint32_t blksz; }; -static const lzma_stream lzma_stream_init = LZMA_STREAM_INIT; +size_t +mkuz_lzma_cbound(size_t blksz) +{ + return (lzma_stream_buffer_bound(blksz)); +} void * -mkuz_lzma_init(uint32_t blksz) +mkuz_lzma_init(int *comp_level) { struct mkuz_lzma *ulp; - if (blksz % USED_BLOCKSIZE != 0) { - errx(1, "cluster size should be multiple of %d", - USED_BLOCKSIZE); + if (*comp_level == USE_DEFAULT_LEVEL) + *comp_level = LZMA_PRESET_DEFAULT; + if (*comp_level < 0 || *comp_level > 9) + errx(1, "provided compression level %d is invalid", + *comp_level); /* Not reached */ - } - if (blksz > MAXPHYS) { - errx(1, "cluster size is too large"); - /* Not reached */ - } + ulp = mkuz_safe_zmalloc(sizeof(struct mkuz_lzma)); /* Init lzma encoder */ - ulp->strm = lzma_stream_init; - if (lzma_lzma_preset(&ulp->opt_lzma, LZMA_PRESET_DEFAULT)) + ulp->strm = (lzma_stream)LZMA_STREAM_INIT; + if (lzma_lzma_preset(&ulp->opt_lzma, *comp_level)) errx(1, "Error loading LZMA preset"); ulp->filters[0].id = LZMA_FILTER_LZMA2; ulp->filters[0].options = &ulp->opt_lzma; ulp->filters[1].id = LZMA_VLI_UNKNOWN; - ulp->blksz = blksz; - return (void *)ulp; } -struct mkuz_blk * -mkuz_lzma_compress(void *p, const struct mkuz_blk *iblk) +void +mkuz_lzma_compress(void *p, const struct mkuz_blk *iblk, struct mkuz_blk *oblk) { lzma_ret ret; - struct mkuz_blk *rval; struct mkuz_lzma *ulp; ulp = (struct mkuz_lzma *)p; - rval = mkuz_blk_ctor(ulp->blksz * 2); - ret = lzma_stream_encoder(&ulp->strm, ulp->filters, LZMA_CHECK_CRC32); if (ret != LZMA_OK) { if (ret == LZMA_MEMLIMIT_ERROR) @@ -99,23 +93,20 @@ mkuz_lzma_compress(void *p, const struct mkuz_blk *ibl } ulp->strm.next_in = iblk->data; - ulp->strm.avail_in = ulp->blksz; - ulp->strm.next_out = rval->data; - ulp->strm.avail_out = rval->alen; + ulp->strm.avail_in = iblk->info.len; + ulp->strm.next_out = oblk->data; + ulp->strm.avail_out = oblk->alen; ret = lzma_code(&ulp->strm, LZMA_FINISH); - if (ret != LZMA_STREAM_END) { - /* Error */ + if (ret != LZMA_STREAM_END) errx(1, "lzma_code FINISH failed, code=%d, pos(in=%zd, " - "out=%zd)", ret, (ulp->blksz - ulp->strm.avail_in), - (ulp->blksz * 2 - ulp->strm.avail_out)); - } + "out=%zd)", ret, (iblk->info.len - ulp->strm.avail_in), + (oblk->alen - ulp->strm.avail_out)); #if 0 lzma_end(&ulp->strm); #endif - rval->info.len = rval->alen - ulp->strm.avail_out; - return (rval); + oblk->info.len = oblk->alen - ulp->strm.avail_out; } Modified: head/usr.bin/mkuzip/mkuz_lzma.h ============================================================================== --- head/usr.bin/mkuzip/mkuz_lzma.h Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_lzma.h Tue Aug 13 23:32:56 2019 (r351005) @@ -38,5 +38,6 @@ "exit $?\n" #define DEFAULT_SUFX_LZMA ".ulzma" -void *mkuz_lzma_init(uint32_t); -struct mkuz_blk *mkuz_lzma_compress(void *, const struct mkuz_blk *); +size_t mkuz_lzma_cbound(size_t); +void *mkuz_lzma_init(int *); +void mkuz_lzma_compress(void *, const struct mkuz_blk *, struct mkuz_blk *); Modified: head/usr.bin/mkuzip/mkuz_zlib.c ============================================================================== --- head/usr.bin/mkuzip/mkuz_zlib.c Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_zlib.c Tue Aug 13 23:32:56 2019 (r351005) @@ -34,54 +34,51 @@ __FBSDID("$FreeBSD$"); #include #include "mkuzip.h" -#include "mkuz_zlib.h" #include "mkuz_blk.h" +#include "mkuz_zlib.h" struct mkuz_zlib { - uLongf oblen; - uint32_t blksz; + int comp_level; }; +size_t +mkuz_zlib_cbound(size_t blksz) +{ + return (compressBound(blksz)); +} + void * -mkuz_zlib_init(uint32_t blksz) +mkuz_zlib_init(int *comp_level) { struct mkuz_zlib *zp; - if (blksz % DEV_BSIZE != 0) { - errx(1, "cluster size should be multiple of %d", - DEV_BSIZE); + if (*comp_level == USE_DEFAULT_LEVEL) + *comp_level = Z_BEST_COMPRESSION; + if (*comp_level < Z_BEST_SPEED || *comp_level > Z_BEST_COMPRESSION) + errx(1, "provided compression level %d is invalid", + *comp_level); /* Not reached */ - } - if (compressBound(blksz) > MAXPHYS) { - errx(1, "cluster size is too large"); - /* Not reached */ - } + zp = mkuz_safe_zmalloc(sizeof(struct mkuz_zlib)); - zp->oblen = compressBound(blksz); - zp->blksz = blksz; + zp->comp_level = *comp_level; - return (void *)zp; + return (zp); } -struct mkuz_blk * -mkuz_zlib_compress(void *p, const struct mkuz_blk *iblk) +void +mkuz_zlib_compress(void *p, const struct mkuz_blk *iblk, struct mkuz_blk *oblk) { uLongf destlen_z; - struct mkuz_blk *rval; struct mkuz_zlib *zp; zp = (struct mkuz_zlib *)p; - rval = mkuz_blk_ctor(zp->oblen); - - destlen_z = rval->alen; - if (compress2(rval->data, &destlen_z, iblk->data, zp->blksz, - Z_BEST_COMPRESSION) != Z_OK) { - errx(1, "can't compress data: compress2() " - "failed"); + destlen_z = oblk->alen; + if (compress2(oblk->data, &destlen_z, iblk->data, iblk->info.len, + zp->comp_level) != Z_OK) { + errx(1, "can't compress data: compress2() failed"); /* Not reached */ } - rval->info.len = (uint32_t)destlen_z; - return (rval); + oblk->info.len = (uint32_t)destlen_z; } Modified: head/usr.bin/mkuzip/mkuz_zlib.h ============================================================================== --- head/usr.bin/mkuzip/mkuz_zlib.h Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuz_zlib.h Tue Aug 13 23:32:56 2019 (r351005) @@ -32,5 +32,6 @@ "(kldstat -qm g_uzip||kldload geom_uzip)>&-&&" \ "mount_cd9660 /dev/`mdconfig -af $0`.uzip $1\nexit $?\n" -void *mkuz_zlib_init(uint32_t); -struct mkuz_blk *mkuz_zlib_compress(void *, const struct mkuz_blk *); +size_t mkuz_zlib_cbound(size_t); +void *mkuz_zlib_init(int *); +void mkuz_zlib_compress(void *, const struct mkuz_blk *, struct mkuz_blk *); Added: head/usr.bin/mkuzip/mkuz_zstd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/mkuzip/mkuz_zstd.c Tue Aug 13 23:32:56 2019 (r351005) @@ -0,0 +1,95 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Conrad Meyer + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include "mkuzip.h" +#include "mkuz_blk.h" +#include "mkuz_zstd.h" + +size_t +mkuz_zstd_cbound(size_t blksz) +{ + return (ZSTD_compressBound(blksz)); +} + +void * +mkuz_zstd_init(int *comp_level) +{ + ZSTD_CCtx *cctx; + size_t rc; + + /* Default chosen for near-parity with mkuzip zlib default. */ + if (*comp_level == USE_DEFAULT_LEVEL) + *comp_level = 9; + if (*comp_level < ZSTD_minCLevel() || *comp_level == 0 || + *comp_level > ZSTD_maxCLevel()) + errx(1, "provided compression level %d is invalid", + *comp_level); + + cctx = ZSTD_createCCtx(); + if (cctx == NULL) + errx(1, "could not allocate Zstd context"); + + rc = ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, + *comp_level); + if (ZSTD_isError(rc)) + errx(1, "Could not set zstd compression level %d: %s", + *comp_level, ZSTD_getErrorName(rc)); + + rc = ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1); + if (ZSTD_isError(rc)) + errx(1, "Could not enable zstd checksum: %s", + ZSTD_getErrorName(rc)); + + return (cctx); +} + +void +mkuz_zstd_compress(void *p, const struct mkuz_blk *iblk, struct mkuz_blk *oblk) +{ + ZSTD_CCtx *cctx; + size_t rc; + + cctx = p; + + rc = ZSTD_compress2(cctx, oblk->data, oblk->alen, iblk->data, + iblk->info.len); + if (ZSTD_isError(rc)) + errx(1, "could not compress data: ZSTD_compress2: %s", + ZSTD_getErrorName(rc)); + + oblk->info.len = rc; +} Added: head/usr.bin/mkuzip/mkuz_zstd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/mkuzip/mkuz_zstd.h Tue Aug 13 23:32:56 2019 (r351005) @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Conrad Meyer + * + * 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$ + */ + +#define DEFAULT_SUFX_ZSTD ".uzst" + +#define CLOOP_MAGIC_ZSTD "#!/bin/sh\n#Z4.0 Format\n" \ + "(kldstat -qm g_uzip||kldload geom_uzip)>&-&&" \ + "mount_cd9660 /dev/`mdconfig -af $0`.uzip $1\nexit $?\n" + +size_t mkuz_zstd_cbound(size_t); +void *mkuz_zstd_init(int *); +void mkuz_zstd_compress(void *, const struct mkuz_blk *, struct mkuz_blk *); Modified: head/usr.bin/mkuzip/mkuzip.8 ============================================================================== --- head/usr.bin/mkuzip/mkuzip.8 Tue Aug 13 21:49:07 2019 (r351004) +++ head/usr.bin/mkuzip/mkuzip.8 Tue Aug 13 23:32:56 2019 (r351005) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2019 +.Dd August 9, 2019 .Dt MKUZIP 8 .Os .Sh NAME @@ -35,7 +35,9 @@ class .Sh SYNOPSIS .Nm -.Op Fl dLSsvZ +.Op Fl dSsvZ +.Op Fl A Ar compression_algorithm +.Op Fl C Ar compression_level .Op Fl j Ar compression_jobs .Op Fl o Ar outfile .Op Fl s Ar cluster_size @@ -57,17 +59,82 @@ works in two phases: .It An .Ar infile -image is split into clusters; each cluster is compressed using -.Xr zlib 3 -or -.Xr lzma 3 . +image is split into clusters; each cluster is compressed. .It -The resulting set of compressed clusters along with headers that allow -locating each individual cluster is written to the output file. +The resulting set of compressed clusters is written to the output file. +In addition, a +.Dq table of contents +header is written which allows for efficient seeking. .El .Pp The options are: .Bl -tag -width indent +.It Fl A Op Ar lzma | Ar zlib | Ar zstd +Select a specific compression algorithm. +If this option is not provided, the default is +.Ar zlib . +.Pp +The +.Ar lzma +algorithm provides noticeable better compression levels than zlib on the same +data set. +It has vastly slower compression speed and moderately slower decompression +speed. +.Pp +The +.Ar zstd +algorithm provides better compression levels than zlib on the same data set. +It also has faster compression and decompression speed than zlib. +In the very high compression +.Dq level +settings, it does not offer quite as high a compression ratio as +.Ar lzma . +However, its decompression speed does not suffer at high compression +.Dq levels . +.It Fl C Ar compression_level +Select the integer compression level used to parameterize the chosen +compression algorithm. +.Pp +For any given algorithm, a lesser number selects a faster compression mode. +A greater number selects a slower compression mode. +Typically, for the same algorithm, a greater +.Ar compression_level +provides better final compression ratio. +.Pp +For +.Ar lzma , +the range of valid compression levels is +.Va 0-9 . +The +.Nm +default for lzma is +.Va 6 . +.Pp +For +.Ar zlib , +the range of valid compression levels is +.Va 1-9 . +The +.Nm +default for zlib is +.Va 9 . +.Pp +For +.Ar zstd , +the range of valid compression levels is currently +.Va 1-19 . +The +.Nm +default for zstd is +.Va 9 . +.It Fl d +Enable de-duplication. +When the option is enabled +.Nm +detects identical blocks in the input and replaces each subsequent occurrence *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Aug 14 02:02:14 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE6A3C36C1; Wed, 14 Aug 2019 02:02:14 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467Xs261Skz4fMt; Wed, 14 Aug 2019 02:02:14 +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 B1ECF20D1F; Wed, 14 Aug 2019 02:02:14 +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 x7E22EJv098951; Wed, 14 Aug 2019 02:02:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7E22Eao098950; Wed, 14 Aug 2019 02:02:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908140202.x7E22Eao098950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Aug 2019 02:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351006 - head/sys/dev/nvd X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvd X-SVN-Commit-Revision: 351006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 02:02:15 -0000 Author: mav Date: Wed Aug 14 02:02:14 2019 New Revision: 351006 URL: https://svnweb.freebsd.org/changeset/base/351006 Log: Add missing break statements in r351004. Surprisingly code still worked, but thanks imp@ for noticing it. MFC after: 1 week Modified: head/sys/dev/nvd/nvd.c Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Tue Aug 13 23:32:56 2019 (r351005) +++ head/sys/dev/nvd/nvd.c Wed Aug 14 02:02:14 2019 (r351006) @@ -306,8 +306,10 @@ nvd_getattr(struct bio *bp) nsdata = nvme_ns_get_data(ndisk->ns); /* Try to return NGUID as lunid. */ - for (i = 0; i < sizeof(nsdata->nguid); i++) + for (i = 0; i < sizeof(nsdata->nguid); i++) { if (nsdata->nguid[i] != 0) + break; + } if (i < sizeof(nsdata->nguid)) { if (bp->bio_length < sizeof(nsdata->nguid) * 2 + 1) return (EFAULT); @@ -320,8 +322,10 @@ nvd_getattr(struct bio *bp) } /* Try to return EUI64 as lunid. */ - for (i = 0; i < sizeof(nsdata->eui64); i++) + for (i = 0; i < sizeof(nsdata->eui64); i++) { if (nsdata->eui64[i] != 0) + break; + } if (i < sizeof(nsdata->eui64)) { if (bp->bio_length < sizeof(nsdata->eui64) * 2 + 1) return (EFAULT); From owner-svn-src-head@freebsd.org Wed Aug 14 03:03:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C152C486C for ; Wed, 14 Aug 2019 03:03:53 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467ZD809JCz3Dnj for ; Wed, 14 Aug 2019 03:03:51 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1565751810; bh=RNj8Cs5yCVP+sjS006PpSHc8oo4lTZXvZJB1vDfdFeg=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=KGXi/uCVUZVgd6snT+DS3oPZv6idT4Sa8xTqKsgDBC9saKewVrxtvJIqBZBfS1vfm l+ApPJbzTnd3ctUQWdEcC5lGKUfLGyZiL9ajgID5S4WMccjbayyYweTbK5cmBd3Tnd c2cd8axf1TRzcA1F0a/LH3NQQtNg4LPudHtrm+6s= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de.walstatt.dynvpn.de ([77.183.85.235]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFbW0-1i4pGG1Fvy-00H4OS; Wed, 14 Aug 2019 05:03:30 +0200 Date: Wed, 14 Aug 2019 05:03:00 +0200 From: "O. Hartmann" To: Alan Somers Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r350998 - head/sbin/ping Message-ID: <20190814050327.4205ad36@thor.intern.walstatt.dynvpn.de.walstatt.dynvpn.de> In-Reply-To: <201908131927.x7DJROQ5054211@repo.freebsd.org> References: <201908131927.x7DJROQ5054211@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:lFWc8PP+xcayRBhbmx0aWbZwXRQJtHbO8JO8CaDHqSLGHktnzcx QO6xvp1YPgf5FgBvTCdR6lxxMxgK+OjcHba9zGza6fXidI0Xo5U+Bro/yFW/pad4nZc9UP9 6ssu5a4qpfUUEZcZ8MWtVorwxdBW5Yx9xBW4/l0sKJyo5F/IjMHqHDiXB1W7u0pqR7neujt q2tqHZtFu8gi8mtBibADA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:W2XLwwlOXPo=:D1CC1Th/YVWR1PLlUydVGL UEVTM3lBhiLIUs6Z1MjgopiU/cyTOod+3XVJmuPVGymICTKAnayoBrida/XH6ppRhIPNYoI9f IFKkwvlaTLAAsGglnbPZ5SH+s6h0IkVxMLCNNGAG4NRK4tQPB6GeuTmaYmNjkoDEkkBXD7TPl q/bkl8leT5lY4mMybFmo2D3S3ci9y0DehHPXIxN51KUAgl8IHy3usIzW5ug+VnXfY1cKJWZIZ lphNk2Dy8/bZBNldXaOm3xfMu2cVXf7BE3SvBvXuqzljDTwHpwZh7jm7DQ1IbQf7tXjEd5MHi /RtWzerQxPQgwdfUVOjU/BBIrA60zp0UjjfH8KT9aNRFey7Sk79frrEJSXz3Hu+GwMK5OlLWK Pf8p2c45sSonWRqICUSpZxxLF9oWD7B8Ok5yEJgi3i7lHNbNBJ3sXN6h+LW5CnKlZoNnRNsGP oxcNnVwF0n4HYq78gBDfIUbCISG0vxAiSnKi66M50HsJFCOryajlWtWGpjPWo/5lcMDqcglOS 2kBNnDia6Uyk+J77ohYvZn+HlvChoHr8Ox+dVo91LOmITAcAW/gMcDAQkiFc3tmRIzXLocaba hCMWWK9UBpOmb1zAVcfJPO+cl37ci47EXv9kMvGd3q9HmRS/vbKb6Dy/aRsMV6WSiiS9tLfCA wrrvogdBVw58ioplupvvOh2D7o8W9//YdO6RHKxYM/tVptFAqawo2JWLbdJqB6Tozy8L+81KB Uhi/NUHuNTEbDoFV+ViVx4GIcFYFn1dSxc0FfXZDpluRmq32iXnNemyPfQjvgGBWcIkPaWKtY yANq/ZSujhNzOAS0Qp7ro9kaE2gzHfsIA1/ArNuqKXKwK4s1+MOQb5VMh0uVvSuIdxNFg+Cw8 s09g5WOv0nBg+0Up4VShmaMmQkdLSatSWMT2QLWif4nKCelzW/195gXcci0osjCYPaoC69cwG NPM5w+ICQwFxhsHvIw4uJ+nZEBWuLeXfRYrJM1WN3o/g0JiSiHMxlXM6nNyA3PGfVjQN2/jv5 xLtBAROC/0uvmBaHu1zjur3MXCc2DME8UDONzAnzg8D4Uz+oIdMQ5ob/RGSXNrRkROOXZqBdE 81blIIBjIC71QG2vBUw6mSN+h9vHEDlcCE4TstQtfcmCH5+3XqXQ4POKyIrYR177m9/uFf04a cR9c8= X-Rspamd-Queue-Id: 467ZD809JCz3Dnj X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=KGXi/uCV; dmarc=none; spf=none (mx1.freebsd.org: domain of ohartmann@walstatt.org has no SPF policy when checking 212.227.15.19) smtp.mailfrom=ohartmann@walstatt.org X-Spamd-Result: default: False [-4.22 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; IP_SCORE(-1.05)[ip: (-6.14), ipnet: 212.227.0.0/16(-1.37), asn: 8560(2.26), country: DE(-0.01)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[walstatt.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; MIME_BASE64_TEXT(0.10)[]; RCVD_IN_DNSWL_NONE(0.00)[19.15.227.212.list.dnswl.org : 127.0.3.0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[235.85.183.77.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.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.29 Precedence: list List-Id: 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, 14 Aug 2019 03:03:53 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFR1 ZSwgMTMgQXVnIDIwMTkgMTk6Mjc6MjQgKzAwMDAgKFVUQykNCkFsYW4gU29tZXJzIDxhc29tZXJz QEZyZWVCU0Qub3JnPiBzY2hyaWViOg0KDQo+IEF1dGhvcjogYXNvbWVycw0KPiBEYXRlOiBUdWUg QXVnIDEzIDE5OjI3OjIzIDIwMTkNCj4gTmV3IFJldmlzaW9uOiAzNTA5OTgNCj4gVVJMOiBodHRw czovL3N2bndlYi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8zNTA5OTgNCj4gDQo+IExvZzoN Cj4gICBwaW5nOiB1c2UgdGhlIG1vbm90b25pYyBjbG9jayB0byBtZWFzdXJlIGR1cmF0aW9ucw0K PiAgIA0KPiAgIFN1Ym1pdHRlZCBieToJSsOhbiBTdcSNYW4gPHN1Y2FuamFuQGdtYWlsLmNvbT4N Cj4gICBNRkMgYWZ0ZXI6CTIgd2Vla3MNCj4gICBTcG9uc29yZWQgYnk6CUdvb2dsZSwgaW5jLiAo R29vZ2xlIFN1bW1lciBvZiBDb2RlIDIwMTkpDQo+ICAgRGlmZmVyZW50aWFsIFJldmlzaW9uOglo dHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDIxMjQ1DQo+IA0KPiBNb2RpZmllZDoNCj4gICBo ZWFkL3NiaW4vcGluZy9waW5nLmMNCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3NiaW4vcGluZy9waW5n LmMNCj4gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09DQo+IC0tLSBoZWFkL3NiaW4vcGluZy9waW5nLmMJ VHVlIEF1ZyAxMyAxOToyNDoxNyAyMDE5CShyMzUwOTk3KQ0KPiArKysgaGVhZC9zYmluL3Bpbmcv cGluZy5jCVR1ZSBBdWcgMTMgMTk6Mjc6MjMgMjAxOQkocjM1MDk5OCkNCj4gQEAgLTk2LDYgKzk2 LDcgQEAgX19GQlNESUQoIiRGcmVlQlNEJCIpOw0KPiAgI2luY2x1ZGUgPHN0ZGxpYi5oPg0KPiAg I2luY2x1ZGUgPHN0cmluZy5oPg0KPiAgI2luY2x1ZGUgPHN5c2V4aXRzLmg+DQo+ICsjaW5jbHVk ZSA8dGltZS5oPg0KPiAgI2luY2x1ZGUgPHVuaXN0ZC5oPg0KPiAgDQo+ICAjZGVmaW5lCUlOQURE Ul9MRU4JKChpbnQpc2l6ZW9mKGluX2FkZHJfdCkpDQo+IEBAIC0xMTksNyArMTIwLDcgQEAgX19G QlNESUQoIiRGcmVlQlNEJCIpOw0KPiAgDQo+ICBzdHJ1Y3QgdHYzMiB7DQo+ICAJaW50MzJfdCB0 djMyX3NlYzsNCj4gLQlpbnQzMl90IHR2MzJfdXNlYzsNCj4gKwlpbnQzMl90IHR2MzJfbnNlYzsN Cj4gIH07DQo+ICANCj4gIC8qIHZhcmlvdXMgb3B0aW9ucyAqLw0KPiBAQCAtMjE3LDExICsyMTgs MTAgQEAgc3RhdGljIGNoYXIgKnByX2FkZHIoc3RydWN0IGluX2FkZHIpOw0KPiAgc3RhdGljIGNo YXIgKnByX250aW1lKG5fdGltZSk7DQo+ICBzdGF0aWMgdm9pZCBwcl9pY21waChzdHJ1Y3QgaWNt cCAqKTsNCj4gIHN0YXRpYyB2b2lkIHByX2lwaChzdHJ1Y3QgaXAgKik7DQo+IC1zdGF0aWMgdm9p ZCBwcl9wYWNrKGNoYXIgKiwgaW50LCBzdHJ1Y3Qgc29ja2FkZHJfaW4gKiwgc3RydWN0IHRpbWV2 YWwgKik7DQo+ICtzdGF0aWMgdm9pZCBwcl9wYWNrKGNoYXIgKiwgaW50LCBzdHJ1Y3Qgc29ja2Fk ZHJfaW4gKiwgc3RydWN0IHRpbWVzcGVjICopOw0KPiAgc3RhdGljIHZvaWQgcHJfcmV0aXAoc3Ry dWN0IGlwICopOw0KPiAgc3RhdGljIHZvaWQgc3RhdHVzKGludCk7DQo+ICBzdGF0aWMgdm9pZCBz dG9waXQoaW50KTsNCj4gLXN0YXRpYyB2b2lkIHR2c3ViKHN0cnVjdCB0aW1ldmFsICosIGNvbnN0 IHN0cnVjdCB0aW1ldmFsICopOw0KPiAgc3RhdGljIHZvaWQgdXNhZ2Uodm9pZCkgX19kZWFkMjsN Cj4gIA0KPiAgaW50DQo+IEBAIC0yMjksNyArMjI5LDcgQEAgbWFpbihpbnQgYXJnYywgY2hhciAq Y29uc3QgKmFyZ3YpDQo+ICB7DQo+ICAJc3RydWN0IHNvY2thZGRyX2luIGZyb20sIHNvY2tfaW47 DQo+ICAJc3RydWN0IGluX2FkZHIgaWZhZGRyOw0KPiAtCXN0cnVjdCB0aW1ldmFsIGxhc3QsIGlu dHZsOw0KPiArCXN0cnVjdCB0aW1lc3BlYyBsYXN0LCBpbnR2bDsNCj4gIAlzdHJ1Y3QgaW92ZWMg aW92Ow0KPiAgCXN0cnVjdCBpcCAqaXA7DQo+ICAJc3RydWN0IG1zZ2hkciBtc2c7DQo+IEBAIC0y NDcsNyArMjQ3LDcgQEAgbWFpbihpbnQgYXJnYywgY2hhciAqY29uc3QgKmFyZ3YpDQo+ICAJbG9u ZyBsdG1wOw0KPiAgCWludCBhbG1vc3RfZG9uZSwgY2gsIGRmLCBob2xkLCBpLCBpY21wX2xlbiwg bWliWzRdLCBwcmVsb2FkOw0KPiAgCWludCBzc2VuZF9lcnJubywgc3JlY3ZfZXJybm8sIHRvcywg dHRsOw0KPiAtCWNoYXIgY3RybFtDTVNHX1NQQUNFKHNpemVvZihzdHJ1Y3QgdGltZXZhbCkpXTsN Cj4gKwljaGFyIGN0cmxbQ01TR19TUEFDRShzaXplb2Yoc3RydWN0IHRpbWVzcGVjKSldOw0KPiAg CWNoYXIgaG5hbWVidWZbTUFYSE9TVE5BTUVMRU5dLCBzbmFtZWJ1ZltNQVhIT1NUTkFNRUxFTl07 DQo+ICAjaWZkZWYgSVBfT1BUSU9OUw0KPiAgCWNoYXIgcnNwYWNlW01BWF9JUE9QVExFTl07CS8q IHJlY29yZCByb3V0ZSBzcGFjZSAqLw0KPiBAQCAtODcxLDE5ICs4NzEsMTkgQEAgbWFpbihpbnQg YXJnYywgY2hhciAqY29uc3QgKmFyZ3YpDQo+ICAJCXdoaWxlIChwcmVsb2FkLS0pCS8qIGZpcmUg b2ZmIHRoZW0gcXVpY2tpZXMgKi8NCj4gIAkJCXBpbmdlcigpOw0KPiAgCX0NCj4gLQkodm9pZCln ZXR0aW1lb2ZkYXkoJmxhc3QsIE5VTEwpOw0KPiArCSh2b2lkKWNsb2NrX2dldHRpbWUoQ0xPQ0tf TU9OT1RPTklDLCAmbGFzdCk7DQo+ICANCj4gIAlpZiAob3B0aW9ucyAmIEZfRkxPT0QpIHsNCj4g IAkJaW50dmwudHZfc2VjID0gMDsNCj4gLQkJaW50dmwudHZfdXNlYyA9IDEwMDAwOw0KPiArCQlp bnR2bC50dl9uc2VjID0gMTAwMDAwMDA7DQo+ICAJfSBlbHNlIHsNCj4gIAkJaW50dmwudHZfc2Vj ID0gaW50ZXJ2YWwgLyAxMDAwOw0KPiAtCQlpbnR2bC50dl91c2VjID0gaW50ZXJ2YWwgJSAxMDAw ICogMTAwMDsNCj4gKwkJaW50dmwudHZfbnNlYyA9IGludGVydmFsICUgMTAwMCAqIDEwMDAwMDA7 DQo+ICAJfQ0KPiAgDQo+ICAJYWxtb3N0X2RvbmUgPSAwOw0KPiAgCXdoaWxlICghZmluaXNoX3Vw KSB7DQo+IC0JCXN0cnVjdCB0aW1ldmFsIG5vdywgdGltZW91dDsNCj4gKwkJc3RydWN0IHRpbWVz cGVjIG5vdywgdGltZW91dDsNCj4gIAkJZmRfc2V0IHJmZHM7DQo+ICAJCWludCBjYywgbjsNCj4g IA0KPiBAQCAtODkyLDI0ICs4OTIsMTYgQEAgbWFpbihpbnQgYXJnYywgY2hhciAqY29uc3QgKmFy Z3YpDQo+ICAJCQllcnJ4KEVYX09TRVJSLCAiZGVzY3JpcHRvciB0b28gbGFyZ2UiKTsNCj4gIAkJ RkRfWkVSTygmcmZkcyk7DQo+ICAJCUZEX1NFVChzcmVjdiwgJnJmZHMpOw0KPiAtCQkodm9pZCln ZXR0aW1lb2ZkYXkoJm5vdywgTlVMTCk7DQo+IC0JCXRpbWVvdXQudHZfc2VjID0gbGFzdC50dl9z ZWMgKyBpbnR2bC50dl9zZWMgLSBub3cudHZfc2VjOw0KPiAtCQl0aW1lb3V0LnR2X3VzZWMgPSBs YXN0LnR2X3VzZWMgKyBpbnR2bC50dl91c2VjIC0gbm93LnR2X3VzZWM7DQo+IC0JCXdoaWxlICh0 aW1lb3V0LnR2X3VzZWMgPCAwKSB7DQo+IC0JCQl0aW1lb3V0LnR2X3VzZWMgKz0gMTAwMDAwMDsN Cj4gLQkJCXRpbWVvdXQudHZfc2VjLS07DQo+IC0JCX0NCj4gLQkJd2hpbGUgKHRpbWVvdXQudHZf dXNlYyA+PSAxMDAwMDAwKSB7DQo+IC0JCQl0aW1lb3V0LnR2X3VzZWMgLT0gMTAwMDAwMDsNCj4g LQkJCXRpbWVvdXQudHZfc2VjKys7DQo+IC0JCX0NCj4gKwkJKHZvaWQpY2xvY2tfZ2V0dGltZShD TE9DS19NT05PVE9OSUMsICZub3cpOw0KPiArCQl0aW1lc3BlY2FkZCgmbGFzdCwgJmludHZsLCAm dGltZW91dCk7DQo+ICsJCXRpbWVzcGVjc3ViKCZ0aW1lb3V0LCAmbm93LCAmdGltZW91dCk7DQo+ ICAJCWlmICh0aW1lb3V0LnR2X3NlYyA8IDApDQo+IC0JCQl0aW1lcmNsZWFyKCZ0aW1lb3V0KTsN Cj4gLQkJbiA9IHNlbGVjdChzcmVjdiArIDEsICZyZmRzLCBOVUxMLCBOVUxMLCAmdGltZW91dCk7 DQo+ICsJCQl0aW1lc3BlY2NsZWFyKCZ0aW1lb3V0KTsNCj4gKwkJbiA9IHBzZWxlY3Qoc3JlY3Yg KyAxLCAmcmZkcywgTlVMTCwgTlVMTCwgJnRpbWVvdXQsIE5VTEwpOw0KPiAgCQlpZiAobiA8IDAp DQo+ICAJCQljb250aW51ZTsJLyogTXVzdCBiZSBFSU5UUi4gKi8NCj4gIAkJaWYgKG4gPT0gMSkg ew0KPiAtCQkJc3RydWN0IHRpbWV2YWwgKnR2ID0gTlVMTDsNCj4gKwkJCXN0cnVjdCB0aW1lc3Bl YyAqdHYgPSBOVUxMOw0KPiAgI2lmZGVmIFNPX1RJTUVTVEFNUA0KPiAgCQkJc3RydWN0IGNtc2do ZHIgKmNtc2cgPSAoc3RydWN0IGNtc2doZHIgKikmY3RybDsNCj4gIA0KPiBAQCAtOTMyLDcgKzky NCw3IEBAIG1haW4oaW50IGFyZ2MsIGNoYXIgKmNvbnN0ICphcmd2KQ0KPiAgCQkJfQ0KPiAgI2Vu ZGlmDQo+ICAJCQlpZiAodHYgPT0gTlVMTCkgew0KPiAtCQkJCSh2b2lkKWdldHRpbWVvZmRheSgm bm93LCBOVUxMKTsNCj4gKwkJCQkodm9pZCljbG9ja19nZXR0aW1lKENMT0NLX01PTk9UT05JQywg Jm5vdyk7DQo+ICAJCQkJdHYgPSAmbm93Ow0KPiAgCQkJfQ0KPiAgCQkJcHJfcGFjaygoY2hhciAq KXBhY2tldCwgY2MsICZmcm9tLCB0dik7DQo+IEBAIC05NTYsMTcgKzk0OCwxNyBAQCBtYWluKGlu dCBhcmdjLCBjaGFyICpjb25zdCAqYXJndikNCj4gIAkJCQlpZiAoYWxtb3N0X2RvbmUpDQo+ICAJ CQkJCWJyZWFrOw0KPiAgCQkJCWFsbW9zdF9kb25lID0gMTsNCj4gLQkJCQlpbnR2bC50dl91c2Vj ID0gMDsNCj4gKwkJCQlpbnR2bC50dl9uc2VjID0gMDsNCj4gIAkJCQlpZiAobnJlY2VpdmVkKSB7 DQo+ICAJCQkJCWludHZsLnR2X3NlYyA9IDIgKiB0bWF4IC8gMTAwMDsNCj4gIAkJCQkJaWYgKCFp bnR2bC50dl9zZWMpDQo+ICAJCQkJCQlpbnR2bC50dl9zZWMgPSAxOw0KPiAgCQkJCX0gZWxzZSB7 DQo+ICAJCQkJCWludHZsLnR2X3NlYyA9IHdhaXR0aW1lIC8gMTAwMDsNCj4gLQkJCQkJaW50dmwu dHZfdXNlYyA9IHdhaXR0aW1lICUgMTAwMCAqIDEwMDA7DQo+ICsJCQkJCWludHZsLnR2X25zZWMg PSB3YWl0dGltZSAlIDEwMDAgKiAxMDAwMDAwOw0KPiAgCQkJCX0NCj4gIAkJCX0NCj4gLQkJCSh2 b2lkKWdldHRpbWVvZmRheSgmbGFzdCwgTlVMTCk7DQo+ICsJCQkodm9pZCljbG9ja19nZXR0aW1l KENMT0NLX01PTk9UT05JQywgJmxhc3QpOw0KPiAgCQkJaWYgKG50cmFuc21pdHRlZCAtIG5yZWNl aXZlZCAtIDEgPiBubWlzc2VkbWF4KSB7DQo+ICAJCQkJbm1pc3NlZG1heCA9IG50cmFuc21pdHRl ZCAtIG5yZWNlaXZlZCAtIDE7DQo+ICAJCQkJaWYgKG9wdGlvbnMgJiBGX01JU1NFRCkNCj4gQEAg LTEwMDMsMTMgKzk5NSwxMyBAQCBzdG9waXQoaW50IHNpZyBfX3VudXNlZCkNCj4gICAqCUNvbXBv c2UgYW5kIHRyYW5zbWl0IGFuIElDTVAgRUNITyBSRVFVRVNUIHBhY2tldC4gIFRoZSBJUCBwYWNr ZXQNCj4gICAqIHdpbGwgYmUgYWRkZWQgb24gYnkgdGhlIGtlcm5lbC4gIFRoZSBJRCBmaWVsZCBp cyBvdXIgVU5JWCBwcm9jZXNzIElELA0KPiAgICogYW5kIHRoZSBzZXF1ZW5jZSBudW1iZXIgaXMg YW4gYXNjZW5kaW5nIGludGVnZXIuICBUaGUgZmlyc3QgVElNRVZBTF9MRU4NCj4gLSAqIGJ5dGVz IG9mIHRoZSBkYXRhIHBvcnRpb24gYXJlIHVzZWQgdG8gaG9sZCBhIFVOSVggInRpbWV2YWwiIHN0 cnVjdCBpbg0KPiArICogYnl0ZXMgb2YgdGhlIGRhdGEgcG9ydGlvbiBhcmUgdXNlZCB0byBob2xk IGEgVU5JWCAidGltZXNwZWMiIHN0cnVjdCBpbg0KPiAgICogaG9zdCBieXRlLW9yZGVyLCB0byBj b21wdXRlIHRoZSByb3VuZC10cmlwIHRpbWUuDQo+ICAgKi8NCj4gIHN0YXRpYyB2b2lkDQo+ICBw aW5nZXIodm9pZCkNCj4gIHsNCj4gLQlzdHJ1Y3QgdGltZXZhbCBub3c7DQo+ICsJc3RydWN0IHRp bWVzcGVjIG5vdzsNCj4gIAlzdHJ1Y3QgdHYzMiB0djMyOw0KPiAgCXN0cnVjdCBpcCAqaXA7DQo+ ICAJc3RydWN0IGljbXAgKmljcDsNCj4gQEAgLTEwMjcsMTMgKzEwMTksMTggQEAgcGluZ2VyKHZv aWQpDQo+ICAJQ0xSKG50cmFuc21pdHRlZCAlIG14X2R1cF9jayk7DQo+ICANCj4gIAlpZiAoKG9w dGlvbnMgJiBGX1RJTUUpIHx8IHRpbWluZykgew0KPiAtCQkodm9pZClnZXR0aW1lb2ZkYXkoJm5v dywgTlVMTCk7DQo+IC0NCj4gLQkJdHYzMi50djMyX3NlYyA9IGh0b25sKG5vdy50dl9zZWMpOw0K PiAtCQl0djMyLnR2MzJfdXNlYyA9IGh0b25sKG5vdy50dl91c2VjKTsNCj4gKwkJKHZvaWQpY2xv Y2tfZ2V0dGltZShDTE9DS19NT05PVE9OSUMsICZub3cpOw0KPiArCQkvKg0KPiArCQkgKiBUcnVu Y2F0ZSBzZWNvbmRzIGRvd24gdG8gMzIgYml0cyBpbiBvcmRlcg0KPiArCQkgKiB0byBmaXQgdGhl IHRpbWVzdGFtcCB3aXRoaW4gOCBieXRlcyBvZiB0aGUNCj4gKwkJICogcGFja2V0LiBXZSdyZSBv bmx5IGNvbmNlcm5lZCB3aXRoDQo+ICsJCSAqIGR1cmF0aW9ucywgbm90IGFic29sdXRlIHRpbWVz Lg0KPiArCQkgKi8NCj4gKwkJdHYzMi50djMyX3NlYyA9ICh1aW50MzJfdClodG9ubChub3cudHZf c2VjKTsNCj4gKwkJdHYzMi50djMyX25zZWMgPSAodWludDMyX3QpaHRvbmwobm93LnR2X25zZWMp Ow0KPiAgCQlpZiAob3B0aW9ucyAmIEZfVElNRSkNCj4gIAkJCWljcC0+aWNtcF9vdGltZSA9IGh0 b25sKChub3cudHZfc2VjICUgKDI0KjYwKjYwKSkNCj4gLQkJCQkqIDEwMDAgKyBub3cudHZfdXNl YyAvIDEwMDApOw0KPiArCQkJCSogMTAwMCArIG5vdy50dl9uc2VjIC8gMTAwMDAwMCk7DQo+ICAJ CWlmICh0aW1pbmcpDQo+ICAJCQliY29weSgodm9pZCAqKSZ0djMyLA0KPiAgCQkJICAgICh2b2lk ICopJm91dHBhY2tbSUNNUF9NSU5MRU4gKyBwaGRyX2xlbl0sDQo+IEBAIC0xMDc5LDcgKzEwNzYs NyBAQCBwaW5nZXIodm9pZCkNCj4gICAqIHByb2dyYW0gdG8gYmUgcnVuIHdpdGhvdXQgaGF2aW5n IGludGVybWluZ2xlZCBvdXRwdXQgKG9yIHN0YXRpc3RpY3MhKS4NCj4gICAqLw0KPiAgc3RhdGlj IHZvaWQNCj4gLXByX3BhY2soY2hhciAqYnVmLCBpbnQgY2MsIHN0cnVjdCBzb2NrYWRkcl9pbiAq ZnJvbSwgc3RydWN0IHRpbWV2YWwgKnR2KQ0KPiArcHJfcGFjayhjaGFyICpidWYsIGludCBjYywg c3RydWN0IHNvY2thZGRyX2luICpmcm9tLCBzdHJ1Y3QgdGltZXNwZWMgKnR2KQ0KPiAgew0KPiAg CXN0cnVjdCBpbl9hZGRyIGluYTsNCj4gIAl1X2NoYXIgKmNwLCAqZHA7DQo+IEBAIC0xMTEyLDcg KzExMDksNyBAQCBwcl9wYWNrKGNoYXIgKmJ1ZiwgaW50IGNjLCBzdHJ1Y3Qgc29ja2FkZHJfaW4g KmZyb20sIHMNCj4gIAkJKytucmVjZWl2ZWQ7DQo+ICAJCXRyaXB0aW1lID0gMC4wOw0KPiAgCQlp ZiAodGltaW5nKSB7DQo+IC0JCQlzdHJ1Y3QgdGltZXZhbCB0djE7DQo+ICsJCQlzdHJ1Y3QgdGlt ZXNwZWMgdHYxOw0KPiAgCQkJc3RydWN0IHR2MzIgdHYzMjsNCj4gICNpZm5kZWYgaWNtcF9kYXRh DQo+ICAJCQl0cCA9ICZpY3AtPmljbXBfaXA7DQo+IEBAIC0xMTI2LDEwICsxMTIzLDEwIEBAIHBy X3BhY2soY2hhciAqYnVmLCBpbnQgY2MsIHN0cnVjdCBzb2NrYWRkcl9pbiAqZnJvbSwgcw0KPiAg CQkJCS8qIENvcHkgdG8gYXZvaWQgYWxpZ25tZW50IHByb2JsZW1zOiAqLw0KPiAgCQkJCW1lbWNw eSgmdHYzMiwgdHAsIHNpemVvZih0djMyKSk7DQo+ICAJCQkJdHYxLnR2X3NlYyA9IG50b2hsKHR2 MzIudHYzMl9zZWMpOw0KPiAtCQkJCXR2MS50dl91c2VjID0gbnRvaGwodHYzMi50djMyX3VzZWMp Ow0KPiAtCQkJCXR2c3ViKHR2LCAmdHYxKTsNCj4gKwkJCQl0djEudHZfbnNlYyA9IG50b2hsKHR2 MzIudHYzMl9uc2VjKTsNCj4gKwkJCQl0aW1lc3BlY3N1Yih0diwgJnR2MSwgdHYpOw0KPiAgIAkJ CQl0cmlwdGltZSA9ICgoZG91YmxlKXR2LT50dl9zZWMpICogMTAwMC4wICsNCj4gLSAJCQkJICAg ICgoZG91YmxlKXR2LT50dl91c2VjKSAvIDEwMDAuMDsNCj4gKwkJCQkgICAgKChkb3VibGUpdHYt PnR2X25zZWMpIC8gMTAwMDAwMC4wOw0KPiAgCQkJCXRzdW0gKz0gdHJpcHRpbWU7DQo+ICAJCQkJ dHN1bXNxICs9IHRyaXB0aW1lICogdHJpcHRpbWU7DQo+ICAJCQkJaWYgKHRyaXB0aW1lIDwgdG1p bikNCj4gQEAgLTEzODEsMjIgKzEzNzgsNiBAQCBpbl9ja3N1bSh1X3Nob3J0ICphZGRyLCBpbnQg bGVuKQ0KPiAgCXN1bSArPSAoc3VtID4+IDE2KTsJCQkvKiBhZGQgY2FycnkgKi8NCj4gIAlhbnN3 ZXIgPSB+c3VtOwkJCQkvKiB0cnVuY2F0ZSB0byAxNiBiaXRzICovDQo+ICAJcmV0dXJuKGFuc3dl cik7DQo+IC19DQo+IC0NCj4gLS8qDQo+IC0gKiB0dnN1YiAtLQ0KPiAtICoJU3VidHJhY3QgMiB0 aW1ldmFsIHN0cnVjdHM6ICBvdXQgPSBvdXQgLSBpbi4gIE91dCBpcyBhc3N1bWVkIHRvDQo+IC0g KiBiZSA+PSBpbi4NCj4gLSAqLw0KPiAtc3RhdGljIHZvaWQNCj4gLXR2c3ViKHN0cnVjdCB0aW1l dmFsICpvdXQsIGNvbnN0IHN0cnVjdCB0aW1ldmFsICppbikNCj4gLXsNCj4gLQ0KPiAtCWlmICgo b3V0LT50dl91c2VjIC09IGluLT50dl91c2VjKSA8IDApIHsNCj4gLQkJLS1vdXQtPnR2X3NlYzsN Cj4gLQkJb3V0LT50dl91c2VjICs9IDEwMDAwMDA7DQo+IC0JfQ0KPiAtCW91dC0+dHZfc2VjIC09 IGluLT50dl9zZWM7DQo+ICB9DQo+ICANCj4gIC8qDQo+IF9fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fDQo+IHN2bi1zcmMtaGVhZEBmcmVlYnNkLm9yZyBtYWls aW5nIGxpc3QNCj4gaHR0cHM6Ly9saXN0cy5mcmVlYnNkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL3N2 bi1zcmMtaGVhZA0KPiBUbyB1bnN1YnNjcmliZSwgc2VuZCBhbnkgbWFpbCB0byAic3ZuLXNyYy1o ZWFkLXVuc3Vic2NyaWJlQGZyZWVic2Qub3JnIg0KDQpwaW5nIGhhcyBub3cgZXhvcmJpdGFudCBo aWdoIGxhdGVuY3kgbnVtYmVyczoNCg0KNjQgYnl0ZXMgZnJvbSAxOTMuOTkuMTQ0LjgwOiBpY21w X3NlcT0xMjMgdHRsPTI0NCB0aW1lPTE1NjU3NTA5NTgzNDcuNzUzIG1zDQo2NCBieXRlcyBmcm9t IDE5My45OS4xNDQuODA6IGljbXBfc2VxPTEyNCB0dGw9MjQ0IHRpbWU9MTU2NTc1MDk1ODM0Ni43 NTkgbXMNCjY0IGJ5dGVzIGZyb20gMTkzLjk5LjE0NC44MDogaWNtcF9zZXE9MTI1IHR0bD0yNDQg dGltZT0xNTY1NzUwOTU4MzQzLjYxNiBtcw0KNjQgYnl0ZXMgZnJvbSAxOTMuOTkuMTQ0LjgwOiBp Y21wX3NlcT0xMjYgdHRsPTI0NCB0aW1lPTE1NjU3NTA5NTgzMzIuOTUwIG1zDQo2NCBieXRlcyBm cm9tIDE5My45OS4xNDQuODA6IGljbXBfc2VxPTEyNyB0dGw9MjQ0IHRpbWU9MTU2NTc1MDk1ODMy OC41NDAgbXMNCjY0IGJ5dGVzIGZyb20gMTkzLjk5LjE0NC44MDogaWNtcF9zZXE9MTI4IHR0bD0y NDQgdGltZT0xNTY1NzUwOTU4MzA5Ljg0OSBtcw0KNjQgYnl0ZXMgZnJvbSAxOTMuOTkuMTQ0Ljgw OiBpY21wX3NlcT0xMjkgdHRsPTI0NCB0aW1lPTE1NjU3NTA5NTgzMDguODkzIG1zDQo2NCBieXRl cyBmcm9tIDE5My45OS4xNDQuODA6IGljbXBfc2VxPTEzMCB0dGw9MjQ0IHRpbWU9MTU2NTc1MDk1 ODMwNS42OTAgbXMNCjY0IGJ5dGVzIGZyb20gMTkzLjk5LjE0NC44MDogaWNtcF9zZXE9MTMxIHR0 bD0yNDQgdGltZT0xNTY1NzUwOTU4MzAzLjI0OCBtcw0KNjQgYnl0ZXMgZnJvbSAxOTMuOTkuMTQ0 LjgwOiBpY21wX3NlcT0xMzIgdHRsPTI0NCB0aW1lPTE1NjU3NTA5NTgyOTQuODEzIG1zDQo2NCBi eXRlcyBmcm9tIDE5My45OS4xNDQuODA6IGljbXBfc2VxPTEzMyB0dGw9MjQ0IHRpbWU9MTU2NTc1 MDk1ODI5Mi44NTMgbXMNCjY0IGJ5dGVzIGZyb20gMTkzLjk5LjE0NC44MDogaWNtcF9zZXE9MTM0 IHR0bD0yNDQgdGltZT0xNTY1NzUwOTU4Mjg0LjQyNiBtcw0KNjQgYnl0ZXMgZnJvbSAxOTMuOTku MTQ0LjgwOiBpY21wX3NlcT0xMzUgdHRsPTI0NCB0aW1lPTE1NjU3NTA5NTgyNzIuNjMyIG1zDQo2 NCBieXRlcyBmcm9tIDE5My45OS4xNDQuODA6IGljbXBfc2VxPTEzNiB0dGw9MjQ0IHRpbWU9MTU2 NTc1MDk1ODI2OC42NjYgbXMNCjY0IGJ5dGVzIGZyb20gMTkzLjk5LjE0NC44MDogaWNtcF9zZXE9 MTM3IHR0bD0yNDQgdGltZT0xNTY1NzUwOTU4MjY3LjUxNCBtcw0KNjQgYnl0ZXMgZnJvbSAxOTMu OTkuMTQ0LjgwOiBpY21wX3NlcT0xMzggdHRsPTI0NCB0aW1lPTE1NjU3NTA5NTgyNTMuMjQzIG1z DQoNCg0KbG9jYWwgRE5TIGRvZXNuJ3Qgd29yayBwcm9wZXJseSBhbnltb3JlIG9uIGEgZHVhbCBz dGFjayBDVVJSRU5UIGJveCwgYnV0IEkgY2FuJ3QgbmFpbCB0aGlzDQpkb3duIHRvIHRoaXMgcGF0 Y2ggc3BlY2lmaWNpY2FsbHkuDQoNCmtpbmQgcmVnYXJkcywNCg0Kb2gNCg0KLSAtLSANCk8uIEhh cnRtYW5uDQoNCkljaCB3aWRlcnNwcmVjaGUgZGVyIE51dHp1bmcgb2RlciDDnGJlcm1pdHRsdW5n IG1laW5lciBEYXRlbiBmw7xyDQpXZXJiZXp3ZWNrZSBvZGVyIGbDvHIgZGllIE1hcmt0LSBvZGVy IE1laW51bmdzZm9yc2NodW5nICjCpyAyOCBBYnMuIDQgQkRTRykuDQotLS0tLUJFR0lOIFBHUCBT SUdOQVRVUkUtLS0tLQ0KDQppSFVFQVJZSUFCMFdJUVN5OElCeEFQRGtxVkJhVEo0NE4xWlpQYmE1 UndVQ1hWTjUvd0FLQ1JBNE4xWlpQYmE1DQpSNW4rQVFDRmwzUldZNXdDMzVsdlFrTjZCd2p6MTFN cGZ4ZHdGenBRT1JTeGFiTVlid0VBNTZSekQ3U3NQc1N1DQpseXV5TE9tcnMrMlZxWGd4OXFZdVlo Y2t1a3BYR1F3PQ0KPTc0dXMNCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ0K From owner-svn-src-head@freebsd.org Wed Aug 14 03:23:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED41CC52D4 for ; Wed, 14 Aug 2019 03:23:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 467Zfx40Vdz3Fjj for ; Wed, 14 Aug 2019 03:23:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id s14so11059813qkm.4 for ; Tue, 13 Aug 2019 20:23:37 -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=8uXq/4XeOFFBZtMQPB0z1xwpKnbnVd9n9+8c7kRgCgk=; b=O6g96ATQ2usij6HnkJK9EWavAgQdH2OSai/1JY9/Ix3aw3MvQVFnkoMuFp7wj1TGhE LSsmqsmuAScb1Vxkr6x/QGKKV36vmL8pWC/M+0sgRCI+dI/L3kAWjXM9I9D2mEpb15wG w0ubAUeNf6IiZPE9jBSHEthPhlULpFmfvZMN26fR35QatY/e9+cw7Hf4NHxSZjBIVoa8 fHNgdpPIwe+fo+THUhrb95hVHPFxxTfGgAaxKetlU5raraoeOrVn1WN/1ZHJxOPZoP6y naHiRvmdsu+ZLX4apdTTK4Yj5f8nsjKuEDT09EkYZDx+Ji9rRIegpCr1aEoVCX/3hBG7 9ryA== 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=8uXq/4XeOFFBZtMQPB0z1xwpKnbnVd9n9+8c7kRgCgk=; b=nm1FlWuNvHI+f2n4G0dA+jfgMTaJf6xG2T2T4Cq9LZhhnygdl+MXyuIVImSePcXKkD 2zfl0CzNkDjEzRtg7+o/M4gDlj2oWIr6rklt0LVlRC6Vjl2eD0T8vyOAOHhUS7EUi9jE yoFn/mqaGvxn/ua8NoNHqcbNXZYOpd/Ju1YPTulh7bIYMZQtx4hk5ZysJBak/NfMNXzM 1oCRsU3lS7dZ4mGrdm1Ytlpki1ou1fcDFaomp3lPOGIS10C+b7Px/Hffjhcus9u+E/WN 7wEtvu3CiGMNYMlCRSyKa0FUstIknGbQNUuCtsN77cyfa65ZjE+zkEdc8EKltNFcOOCm hQSQ== X-Gm-Message-State: APjAAAX5sOlTMExkPQLUUqtOdaTt3xw/0b06LOPXTIOplzXxNU9ts9cF VEPeqsaDCygb7IsFRSys9CT6mxbQy88ErPEaoOmV6w== X-Google-Smtp-Source: APXvYqzz9bx3mtpullqgS+KwdFGpBr/Y5NuRqf0HXw2Eg94gBx2QKv/Ur2/tZi3qiXugMrR2Cn2aPgT0eFe6+h2ydYg= X-Received: by 2002:a37:c87:: with SMTP id 129mr33181757qkm.240.1565753016060; Tue, 13 Aug 2019 20:23:36 -0700 (PDT) MIME-Version: 1.0 References: <201908131927.x7DJROQ5054211@repo.freebsd.org> <20190814050327.4205ad36@thor.intern.walstatt.dynvpn.de.walstatt.dynvpn.de> In-Reply-To: <20190814050327.4205ad36@thor.intern.walstatt.dynvpn.de.walstatt.dynvpn.de> From: Warner Losh Date: Tue, 13 Aug 2019 21:23:25 -0600 Message-ID: Subject: Re: svn commit: r350998 - head/sbin/ping To: "O. Hartmann" Cc: Alan Somers , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 467Zfx40Vdz3Fjj X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=O6g96ATQ; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::731) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; RCVD_IN_DNSWL_NONE(0.00)[1.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; HTTP_TO_IP(1.00)[]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.96)[ip: (-9.37), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.39), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 03:23:39 -0000 On Tue, Aug 13, 2019 at 9:17 PM O. Hartmann wrote: > ping has now exorbitant high latency numbers: > > 64 bytes from 193.99.144.80: icmp_seq=123 ttl=244 time=1565750958347.753 > ms > Ping times of 50 years. Where are you pinging? Mu Cassiopeiae ? Warner From owner-svn-src-head@freebsd.org Wed Aug 14 04:32:56 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB149C697E; Wed, 14 Aug 2019 04:32:56 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 467cBv4fltz3JGZ; Wed, 14 Aug 2019 04:32:55 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f181.google.com with SMTP id e27so8404576ljb.7; Tue, 13 Aug 2019 21:32:55 -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=T/p6+cyZYFqhm0OKydJEl0AmV0iHse0LsJDf3RoF8YI=; b=mdvTI5qnm5IeoYTcZ14qd0wrIj/UNpS773ULumdFUEnsSvUE5AiQSKga/E0nNCvl9x XMK2yzXRvNJB1zbTX9nI1GcgvjYhySReSi3LB6VsSaIDvop7COBN07RCgKRKqcbf9m8C YGArMjqoAmQPCJ0mEjns1qIKlfStWGaCGAWvtmBofEWXecKLRo8YcnbDHup2hnecqvgY OdscvE+vahzcv1iS5P1Eigyq/o746qaEMdF9RirDeU9SVeYuzGUvgyAaxS6tiXs32c8v gcP3Sd6s3HZzqvm614H+nK6EiB1sHGTutZhNJQtdc9mmpHCLirUdfy3/B38t2GL4mNXZ fE5g== X-Gm-Message-State: APjAAAXm3/iRtOD9hyMJNkb5A3EQDjCYHRpnkdWrrL4bck9ydfeYqoPb A9lotkSSCk6vCTbKfVUCSUQkTuUAVBQXF0N4M9CnQkJenMY= X-Google-Smtp-Source: APXvYqwz2cy4BE/BNvJCyz+y2s5HQXdTvrnGhSpojcZuBHBc0npRfwX/g/QKofSUrtVdECXpISe7qSp7vMRRws36brk= X-Received: by 2002:a2e:6e0c:: with SMTP id j12mr23642671ljc.123.1565757173597; Tue, 13 Aug 2019 21:32:53 -0700 (PDT) MIME-Version: 1.0 References: <201908131927.x7DJROQ5054211@repo.freebsd.org> <20190814050327.4205ad36@thor.intern.walstatt.dynvpn.de.walstatt.dynvpn.de> In-Reply-To: From: Alan Somers Date: Tue, 13 Aug 2019 22:32:42 -0600 Message-ID: Subject: Re: svn commit: r350998 - head/sbin/ping To: Warner Losh Cc: "O. Hartmann" , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 467cBv4fltz3JGZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.181 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-4.25 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; RCVD_IN_DNSWL_NONE(0.00)[181.208.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.26)[ip: (-0.50), ipnet: 209.85.128.0/17(-3.38), asn: 15169(-2.39), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 04:32:56 -0000 On Tue, Aug 13, 2019 at 9:23 PM Warner Losh wrote: > > > > On Tue, Aug 13, 2019 at 9:17 PM O. Hartmann wrote: >> >> ping has now exorbitant high latency numbers: >> >> 64 bytes from 193.99.144.80: icmp_seq=123 ttl=244 time=1565750958347.753 ms > > > Ping times of 50 years. Where are you pinging? Mu Cassiopeiae? > > Warner Teehee, that's funny. But you'd probably be happier with this: https://reviews.freebsd.org/D21258 From owner-svn-src-head@freebsd.org Wed Aug 14 09:36:26 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6795CCBB3; Wed, 14 Aug 2019 09:36:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467kx65mMKz437H; Wed, 14 Aug 2019 09:36:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCF3225E73; Wed, 14 Aug 2019 09:36:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7E9aQn6069614; Wed, 14 Aug 2019 09:36:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7E9aQAc069612; Wed, 14 Aug 2019 09:36:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201908140936.x7E9aQAc069612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Aug 2019 09:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 351009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 09:36:27 -0000 Author: hselasky Date: Wed Aug 14 09:36:25 2019 New Revision: 351009 URL: https://svnweb.freebsd.org/changeset/base/351009 Log: Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI. This patch makes the DRM graphics driver in ports usable on aarch64. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D21008 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/device.h head/sys/compat/linuxkpi/common/include/linux/interrupt.h head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Wed Aug 14 06:41:22 2019 (r351008) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Wed Aug 14 09:36:25 2019 (r351009) @@ -110,8 +110,8 @@ struct device { void *driver_data; unsigned int irq; #define LINUX_IRQ_INVALID 65535 - unsigned int msix; - unsigned int msix_max; + unsigned int irq_start; + unsigned int irq_end; const struct attribute_group **groups; struct fwnode_handle *fwnode; Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 06:41:22 2019 (r351008) +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 09:36:25 2019 (r351009) @@ -55,9 +55,11 @@ struct irq_ent { static inline int linux_irq_rid(struct device *dev, unsigned int irq) { - if (irq == dev->irq) + /* check for MSI- or MSIX- interrupt */ + if (irq >= dev->irq_start && irq < dev->irq_end) + return (irq - dev->irq_start + 1); + else return (0); - return irq - dev->msix + 1; } extern void linux_irq_handler(void *); Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 06:41:22 2019 (r351008) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 09:36:25 2019 (r351009) @@ -228,6 +228,7 @@ struct pci_dev { unsigned int devfn; uint32_t class; uint8_t revision; + bool msi_enabled; }; static inline struct resource_list_entry * @@ -262,7 +263,7 @@ linux_pci_find_irq_dev(unsigned int irq) spin_lock(&pci_lock); list_for_each_entry(pdev, &pci_devices, links) { if (irq == pdev->dev.irq || - (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) { + (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) { found = &pdev->dev; break; } @@ -424,10 +425,25 @@ pci_disable_msix(struct pci_dev *pdev) * linux_pci_find_irq_dev() does no longer see them by * resetting their references to zero: */ - pdev->dev.msix = 0; - pdev->dev.msix_max = 0; + pdev->dev.irq_start = 0; + pdev->dev.irq_end = 0; } +#define pci_disable_msi(pdev) \ + linux_pci_disable_msi(pdev) + +static inline void +linux_pci_disable_msi(struct pci_dev *pdev) +{ + + pci_release_msi(pdev->dev.bsddev); + + pdev->dev.irq_start = 0; + pdev->dev.irq_end = 0; + pdev->irq = pdev->dev.irq; + pdev->msi_enabled = false; +} + unsigned long pci_resource_start(struct pci_dev *pdev, int bar); unsigned long pci_resource_len(struct pci_dev *pdev, int bar); @@ -562,10 +578,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr return avail; } rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); - pdev->dev.msix = rle->start; - pdev->dev.msix_max = rle->start + avail; + pdev->dev.irq_start = rle->start; + pdev->dev.irq_end = rle->start + avail; for (i = 0; i < nreq; i++) - entries[i].vector = pdev->dev.msix + i; + entries[i].vector = pdev->dev.irq_start + i; return (0); } @@ -593,6 +609,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix } } while (rc); return (nvec); +} + +#define pci_enable_msi(pdev) \ + linux_pci_enable_msi(pdev) + +static inline int +pci_enable_msi(struct pci_dev *pdev) +{ + struct resource_list_entry *rle; + int error; + int avail; + + avail = pci_msi_count(pdev->dev.bsddev); + if (avail < 1) + return -EINVAL; + + avail = 1; /* this function only enable one MSI IRQ */ + if ((error = -pci_alloc_msi(pdev->dev.bsddev, &avail)) != 0) + return error; + + rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); + pdev->dev.irq_start = rle->start; + pdev->dev.irq_end = rle->start + avail; + pdev->irq = rle->start; + pdev->msi_enabled = true; + return (0); } static inline int From owner-svn-src-head@freebsd.org Wed Aug 14 14:31:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A284AAD581; Wed, 14 Aug 2019 14:31:18 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467sTL3Kvdz4NTq; Wed, 14 Aug 2019 14:31:18 +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 5562014F9; Wed, 14 Aug 2019 14:31:18 +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 x7EEVI6H060343; Wed, 14 Aug 2019 14:31:18 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EEVIFR060342; Wed, 14 Aug 2019 14:31:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201908141431.x7EEVIFR060342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 14 Aug 2019 14:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351027 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 351027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 14:31:18 -0000 Author: andrew Date: Wed Aug 14 14:31:17 2019 New Revision: 351027 URL: https://svnweb.freebsd.org/changeset/base/351027 Log: Enable BSD_CRTBEGIN on powerpc In r342974 jhibbits added support to build crtsavres.o. This was the blocker for BSD_CRTBEGIN to be enabled there. As such enable this option again. Reviewed by: jhibbits Sponsored by: DARPA, AFRL Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Aug 14 13:15:38 2019 (r351026) +++ head/share/mk/src.opts.mk Wed Aug 14 14:31:17 2019 (r351027) @@ -394,8 +394,8 @@ BROKEN_OPTIONS+=HYPERV BROKEN_OPTIONS+=NVME .endif -# PowerPC and Sparc64 need extra crt*.o files -.if ${__T:Mpowerpc*} || ${__T:Msparc64} +# Sparc64 need extra crt*.o files +.if ${__T:Msparc64} BROKEN_OPTIONS+=BSD_CRTBEGIN .endif From owner-svn-src-head@freebsd.org Wed Aug 14 16:12:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EF5FB0D6E; Wed, 14 Aug 2019 16:12: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467vjc0hswz4VZ2; Wed, 14 Aug 2019 16:12:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDD4327A5; Wed, 14 Aug 2019 16:12: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 x7EGC3CX019958; Wed, 14 Aug 2019 16:12:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EGC3Nh019956; Wed, 14 Aug 2019 16:12:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908141612.x7EGC3Nh019956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Aug 2019 16:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351028 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 351028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 16:12:04 -0000 Author: mav Date: Wed Aug 14 16:12:03 2019 New Revision: 351028 URL: https://svnweb.freebsd.org/changeset/base/351028 Log: Report NOIOB and NPWG fields as stripe size. Namespace Optimal I/O Boundary field added in NVMe 1.3 and Namespace Preferred Write Granularity added in 1.4 allow upper layers to align I/Os for improved SSD performance and endurance. I don't have hardware reportig those yet, but NPWG could probably be reported by bhyve. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/dev/nvme/nvme_ns.c head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Wed Aug 14 14:31:17 2019 (r351027) +++ head/sys/dev/nvme/nvme_ns.c Wed Aug 14 16:12:03 2019 (r351028) @@ -231,7 +231,11 @@ uint32_t nvme_ns_get_stripesize(struct nvme_namespace *ns) { - return (ns->stripesize); + if (((ns->data.nsfeat >> NVME_NS_DATA_NSFEAT_NPVALID_SHIFT) & + NVME_NS_DATA_NSFEAT_NPVALID_MASK) != 0 && ns->data.npwg != 0) { + return ((ns->data.npwg + 1) * nvme_ns_get_sector_size(ns)); + } + return (ns->boundary); } static void @@ -447,12 +451,12 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bp->bio_driver1 = cb_fn; - if (ns->stripesize > 0 && + if (ns->boundary > 0 && (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) { num_bios = nvme_get_num_segments(bp->bio_offset, - bp->bio_bcount, ns->stripesize); + bp->bio_bcount, ns->boundary); if (num_bios > 1) - return (nvme_ns_split_bio(ns, bp, ns->stripesize)); + return (nvme_ns_split_bio(ns, bp, ns->boundary)); } switch (bp->bio_cmd) { @@ -511,27 +515,8 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t ns->ctrlr = ctrlr; ns->id = id; - ns->stripesize = 0; /* - * Older Intel devices advertise in vendor specific space an alignment - * that improves performance. If present use for the stripe size. NVMe - * 1.3 standardized this as NOIOB, and newer Intel drives use that. - */ - switch (pci_get_devid(ctrlr->dev)) { - case 0x09538086: /* Intel DC PC3500 */ - case 0x0a538086: /* Intel DC PC3520 */ - case 0x0a548086: /* Intel DC PC4500 */ - case 0x0a558086: /* Dell Intel P4600 */ - if (ctrlr->cdata.vs[3] != 0) - ns->stripesize = - (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; - break; - default: - break; - } - - /* * Namespaces are reconstructed after a controller reset, so check * to make sure we only call mtx_init once on each mtx. * @@ -574,6 +559,27 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t printf("lba format %d exceeds number supported (%d)\n", flbas_fmt, ns->data.nlbaf + 1); return (ENXIO); + } + + /* + * Older Intel devices advertise in vendor specific space an alignment + * that improves performance. If present use for the stripe size. NVMe + * 1.3 standardized this as NOIOB, and newer Intel drives use that. + */ + switch (pci_get_devid(ctrlr->dev)) { + case 0x09538086: /* Intel DC PC3500 */ + case 0x0a538086: /* Intel DC PC3520 */ + case 0x0a548086: /* Intel DC PC4500 */ + case 0x0a558086: /* Dell Intel P4600 */ + if (ctrlr->cdata.vs[3] != 0) + ns->boundary = + (1 << ctrlr->cdata.vs[3]) * ctrlr->min_page_size; + else + ns->boundary = 0; + break; + default: + ns->boundary = ns->data.noiob * nvme_ns_get_sector_size(ns); + break; } if (nvme_ctrlr_has_dataset_mgmt(&ctrlr->cdata)) Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Wed Aug 14 14:31:17 2019 (r351027) +++ head/sys/dev/nvme/nvme_private.h Wed Aug 14 16:12:03 2019 (r351028) @@ -223,7 +223,7 @@ struct nvme_namespace { uint32_t flags; struct cdev *cdev; void *cons_cookie[NVME_MAX_CONSUMERS]; - uint32_t stripesize; + uint32_t boundary; struct mtx lock; }; From owner-svn-src-head@freebsd.org Wed Aug 14 16:45:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79CFFB1B73; Wed, 14 Aug 2019 16:45:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467wRp2TLcz4XWk; Wed, 14 Aug 2019 16:45:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BB132D60; Wed, 14 Aug 2019 16:45:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7EGjAhl039821; Wed, 14 Aug 2019 16:45:10 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EGjAx2039820; Wed, 14 Aug 2019 16:45:10 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908141645.x7EGjAx2039820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 14 Aug 2019 16:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351030 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 351030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 16:45:10 -0000 Author: asomers Date: Wed Aug 14 16:45:09 2019 New Revision: 351030 URL: https://svnweb.freebsd.org/changeset/base/351030 Log: ping: fix triptime calculation after r350998 That revision changed the internal clock to the monotonic, but neglected to change the datagram's timestamp source. Reported by: Oliver Hartmann, Michael Butler Reviewed by: Ján Sučan , allanjude MFC after: 2 weeks MFC-With: r350998 Differential Revision: https://reviews.freebsd.org/D21258 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Wed Aug 14 16:40:23 2019 (r351029) +++ head/sbin/ping/ping.c Wed Aug 14 16:45:09 2019 (r351030) @@ -760,9 +760,15 @@ main(int argc, char *const *argv) } } #ifdef SO_TIMESTAMP - { int on = 1; - if (setsockopt(srecv, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on)) < 0) - err(EX_OSERR, "setsockopt SO_TIMESTAMP"); + { + int on = 1; + int ts_clock = SO_TS_MONOTONIC; + if (setsockopt(srecv, SOL_SOCKET, SO_TIMESTAMP, &on, + sizeof(on)) < 0) + err(EX_OSERR, "setsockopt SO_TIMESTAMP"); + if (setsockopt(srecv, SOL_SOCKET, SO_TS_CLOCK, &ts_clock, + sizeof(ts_clock)) < 0) + err(EX_OSERR, "setsockopt SO_TS_CLOCK"); } #endif if (sweepmax) { From owner-svn-src-head@freebsd.org Wed Aug 14 16:55:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3DADB1F5F; Wed, 14 Aug 2019 16:55:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467wgG5qGnz4YCm; Wed, 14 Aug 2019 16:55:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9EE52F38; Wed, 14 Aug 2019 16:55:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7EGt6Q9046001; Wed, 14 Aug 2019 16:55:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EGt6dn046000; Wed, 14 Aug 2019 16:55:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908141655.x7EGt6dn046000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 14 Aug 2019 16:55:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351033 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 351033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 16:55:07 -0000 Author: asomers Date: Wed Aug 14 16:55:06 2019 New Revision: 351033 URL: https://svnweb.freebsd.org/changeset/base/351033 Log: ping: Make in_cksum() operate on u_char buffer This fixes -Wcast-align errors for in_cksum() calls when compiled with WARNS=6. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21261 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Wed Aug 14 16:54:51 2019 (r351032) +++ head/sbin/ping/ping.c Wed Aug 14 16:55:06 2019 (r351033) @@ -209,7 +209,7 @@ static volatile sig_atomic_t siginfo_p; static cap_channel_t *capdns; static void fill(char *, char *); -static u_short in_cksum(u_short *, int); +static u_short in_cksum(u_char *, int); static cap_channel_t *capdns_setup(void); static void check_status(void); static void finish(void) __dead2; @@ -1046,13 +1046,13 @@ pinger(void) cc = ICMP_MINLEN + phdr_len + datalen; /* compute ICMP checksum here */ - icp->icmp_cksum = in_cksum((u_short *)icp, cc); + icp->icmp_cksum = in_cksum((u_char *)icp, cc); if (options & F_HDRINCL) { cc += sizeof(struct ip); ip = (struct ip *)outpackhdr; ip->ip_len = htons(cc); - ip->ip_sum = in_cksum((u_short *)outpackhdr, cc); + ip->ip_sum = in_cksum(outpackhdr, cc); packet = outpackhdr; } i = send(ssend, (char *)packet, cc, 0); @@ -1348,10 +1348,10 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, s * Checksum routine for Internet Protocol family headers (C Version) */ u_short -in_cksum(u_short *addr, int len) +in_cksum(u_char *addr, int len) { int nleft, sum; - u_short *w; + u_char *w; union { u_short us; u_char uc[2]; @@ -1368,13 +1368,17 @@ in_cksum(u_short *addr, int len) * carry bits from the top 16 bits into the lower 16 bits. */ while (nleft > 1) { - sum += *w++; - nleft -= 2; + u_short data; + + memcpy(&data, w, sizeof(data)); + sum += data; + w += sizeof(data); + nleft -= sizeof(data); } /* mop up an odd byte, if necessary */ if (nleft == 1) { - last.uc[0] = *(u_char *)w; + last.uc[0] = *w; last.uc[1] = 0; sum += last.us; } From owner-svn-src-head@freebsd.org Wed Aug 14 17:04:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD4C4B2655; Wed, 14 Aug 2019 17:04: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467wt45K8sz4ZGm; Wed, 14 Aug 2019 17:04:28 +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 989EB3113; Wed, 14 Aug 2019 17:04:28 +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 x7EH4SQ0052317; Wed, 14 Aug 2019 17:04:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EH4SZV052316; Wed, 14 Aug 2019 17:04:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908141704.x7EH4SZV052316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Aug 2019 17:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351035 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 351035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 17:04:28 -0000 Author: emaste Date: Wed Aug 14 17:04:28 2019 New Revision: 351035 URL: https://svnweb.freebsd.org/changeset/base/351035 Log: arch.7: add tool chain table MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Aug 14 17:02:36 2019 (r351034) +++ head/share/man/man7/arch.7 Wed Aug 14 17:04:28 2019 (r351035) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2018 +.Dd August 14, 2019 .Dt ARCH 7 .Os .Sh NAME @@ -295,6 +295,44 @@ is 8 bytes on all supported architectures except i386. .Fx 11.0 , armv6 used the softfp ABI even though it supported only processors with a floating point unit. +.Ss Tool Chain +.Fx uses a variety of tool chain components for the supported CPU +architectures: +.Xr clang 1 +and +.Xr ld.lld 1 +provided by the base system, +GNU +.Xr gcc 1 +and Binutils +.Xr ld 1 , +or an external toolchain compiler and linker provided by a port or package. +.Bl -column -offset indent "Sy Architecture" "Sy Compiler" "Sy Linker" +.It Sy Architecture Ta Sy Compiler Ta Sy Linker +.It aarch64 Ta Clang Ta lld +.It amd64 Ta Clang Ta lld +.It arm Ta Clang Ta GNU ld 2.17.50 +.It armv6 Ta Clang Ta GNU ld 2.17.50 +.It armv7 Ta Clang Ta lld +.It i386 Ta Clang Ta lld +.It mips Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mipsel Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mipselhf Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mipshf Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mipsn32 Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mips64 Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mips64el Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mips64elhf Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It mips64hf Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It powerpc Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It powerpcspe Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It powerpc64 Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.It riscv64 Ta GCC(1) Ta GNU ld(1) +.It riscv64sf Ta GCC(1) Ta GNU ld(1) +.It sparc64 Ta GCC 4.2.1 Ta GNU ld 2.17.50 +.El +.Pp +(1) External toolchain provided by ports/packages. .Ss Predefined Macros The compiler provides a number of predefined macros. Some of these provide architecture-specific details and are explained below. From owner-svn-src-head@freebsd.org Wed Aug 14 17:13:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F89FB2CF9; Wed, 14 Aug 2019 17:13:37 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467x4d2Jxlz4bLv; Wed, 14 Aug 2019 17:13:37 +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 325EA32DF; Wed, 14 Aug 2019 17:13:37 +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 x7EHDbRK058494; Wed, 14 Aug 2019 17:13:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EHDb5b058493; Wed, 14 Aug 2019 17:13:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908141713.x7EHDb5b058493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Aug 2019 17:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351036 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 351036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 17:13:37 -0000 Author: emaste Date: Wed Aug 14 17:13:36 2019 New Revision: 351036 URL: https://svnweb.freebsd.org/changeset/base/351036 Log: arch.7: add deprecation notice for GCC 4.2.1 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Aug 14 17:04:28 2019 (r351035) +++ head/share/man/man7/arch.7 Wed Aug 14 17:13:36 2019 (r351036) @@ -333,6 +333,10 @@ or an external toolchain compiler and linker provided .El .Pp (1) External toolchain provided by ports/packages. +.Pp +Note that GCC 4.2.1 is deprecated, and scheduled for removal on 2020-03-31. +CPU architectures not migrated to either base system Clang or external +toolchain by then will be desupported. .Ss Predefined Macros The compiler provides a number of predefined macros. Some of these provide architecture-specific details and are explained below. From owner-svn-src-head@freebsd.org Wed Aug 14 17:17:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 115D7B3182; Wed, 14 Aug 2019 17:17:53 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467x9X6ZCnz4c2c; Wed, 14 Aug 2019 17:17:52 +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 C344E32EA; Wed, 14 Aug 2019 17:17:52 +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 x7EHHqds058949; Wed, 14 Aug 2019 17:17:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EHHqsn058948; Wed, 14 Aug 2019 17:17:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908141717.x7EHHqsn058948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Aug 2019 17:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351037 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 351037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 17:17:53 -0000 Author: emaste Date: Wed Aug 14 17:17:52 2019 New Revision: 351037 URL: https://svnweb.freebsd.org/changeset/base/351037 Log: arch.7: clarify that the table shows the default tool chain Reported by: jhb MFC after: 1 week MFC with: r351035 Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Wed Aug 14 17:13:36 2019 (r351036) +++ head/share/man/man7/arch.7 Wed Aug 14 17:17:52 2019 (r351037) @@ -295,7 +295,7 @@ is 8 bytes on all supported architectures except i386. .Fx 11.0 , armv6 used the softfp ABI even though it supported only processors with a floating point unit. -.Ss Tool Chain +.Ss Default Tool Chain .Fx uses a variety of tool chain components for the supported CPU architectures: .Xr clang 1 @@ -307,6 +307,7 @@ GNU and Binutils .Xr ld 1 , or an external toolchain compiler and linker provided by a port or package. +This table shows the default tool chain for each architecture. .Bl -column -offset indent "Sy Architecture" "Sy Compiler" "Sy Linker" .It Sy Architecture Ta Sy Compiler Ta Sy Linker .It aarch64 Ta Clang Ta lld From owner-svn-src-head@freebsd.org Wed Aug 14 17:25:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79D73B36E0 for ; Wed, 14 Aug 2019 17:25:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 467xKp1zrMz4clR for ; Wed, 14 Aug 2019 17:25:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id x4so12930837qts.5 for ; Wed, 14 Aug 2019 10:25:01 -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=inwo4RIEEImpjRhQwH/LUbE6HuJwyozpDKMDSwQ6aKk=; b=tiRwgcEDsFvcoq+Eazw/SJ1W4yofB/1zyAvzPrNGBeW759nyIAWajAgvnZ6Kw3XDWc 43WxPm6h/KTpg/ySqV7LrEzmXv1qvx8zgKteC691JOB3DLwrzP4rVm++nRXwPZD1zThZ kOVjqen7dm0J2mgz+5vAzbR5EsYzurj1cGiV827ehT//4aPZqQsNoQ7ZKO6Md1rBZmlf qODlfejpx09PHkr3llPKoI6sy6aTXZzaDqfMXIaCgeYoiwtYphZs/SEajPMFkwIRtGY/ Lg+2Hf2Ggz0iVaURpwQqEinUgKYY5dp+8t93la2i6fxqRYH0yTSpt03FisEiKdZ76aFl Drhw== 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=inwo4RIEEImpjRhQwH/LUbE6HuJwyozpDKMDSwQ6aKk=; b=gn5HGQrB8OHKBQ4ZGMJlmj1j28hQehl7kqICPcIwy+Fa/KVpNad/1+JjDN72Xxo3+0 uchKQUczkgfKe+aOY1T/42nKJomkm98cmueq2QWNIeVKy1wXDDpPzmAFKH+6WKqVZUq9 ztJrDC83COFX/Tv1wV1wBS95C/TGb317OlBvW1asZqW9pg2rhEwDAqZYpp9vuTqcvuTX pa0C983pfJP2rXz5OxYJG6oon3SEv+ooPst87EoavLJ2/6K+JTC+nsmMcZwIsM60rEan 6GsnV8VkqSBe79GYd6PjCSD4ht0wuTlAJarwXzM0mtG+TDrl0FliEl5M6lDJhN8Bw7IX bZSA== X-Gm-Message-State: APjAAAVskRGEtnvZPe9SplrJR1+wR3IAHbJp/huo/Y46T3OC4/3Qo4TO zREnMI1gN0gSHzVMVN/I//ek3BHa6V2+hcYJNKx47Q== X-Google-Smtp-Source: APXvYqzm656ear9rOuZuYIUU4zcUVt+fBtChqxobsg+78c2IfT7x7kB/AJxHuZO6wj44cJqAcZchgrkxNC9OWlrcHOQ= X-Received: by 2002:a0c:b0ef:: with SMTP id p44mr596894qvc.27.1565803500823; Wed, 14 Aug 2019 10:25:00 -0700 (PDT) MIME-Version: 1.0 References: <201908141713.x7EHDb5b058493@repo.freebsd.org> In-Reply-To: <201908141713.x7EHDb5b058493@repo.freebsd.org> From: Warner Losh Date: Wed, 14 Aug 2019 11:24:49 -0600 Message-ID: Subject: Re: svn commit: r351036 - head/share/man/man7 To: Ed Maste Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 467xKp1zrMz4clR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=tiRwgcED; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::833) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; RCVD_IN_DNSWL_NONE(0.00)[3.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.95)[ip: (-9.34), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.39), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 17:25:03 -0000 On Wed, Aug 14, 2019 at 11:13 AM Ed Maste wrote: > Author: emaste > Date: Wed Aug 14 17:13:36 2019 > New Revision: 351036 > URL: https://svnweb.freebsd.org/changeset/base/351036 > > Log: > arch.7: add deprecation notice for GCC 4.2.1 > > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > > Modified: > head/share/man/man7/arch.7 > > Modified: head/share/man/man7/arch.7 > > ============================================================================== > --- head/share/man/man7/arch.7 Wed Aug 14 17:04:28 2019 (r351035) > +++ head/share/man/man7/arch.7 Wed Aug 14 17:13:36 2019 (r351036) > @@ -333,6 +333,10 @@ or an external toolchain compiler and linker provided > .El > .Pp > (1) External toolchain provided by ports/packages. > +.Pp > +Note that GCC 4.2.1 is deprecated, and scheduled for removal on > 2020-03-31. > +CPU architectures not migrated to either base system Clang or external > +toolchain by then will be desupported. > would using 'removed from the tree' be better here? Because that's the current plan of record. Warner .Ss Predefined Macros > The compiler provides a number of predefined macros. > Some of these provide architecture-specific details and are explained > below. > > From owner-svn-src-head@freebsd.org Wed Aug 14 17:36:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19DBFB3AC7; Wed, 14 Aug 2019 17:36:27 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467xZy70FQz4dKb; Wed, 14 Aug 2019 17:36: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 CD6503830; Wed, 14 Aug 2019 17:36: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 x7EHaQQS070914; Wed, 14 Aug 2019 17:36:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EHaQZA070912; Wed, 14 Aug 2019 17:36:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908141736.x7EHaQZA070912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Aug 2019 17:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351038 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 351038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 17:36:27 -0000 Author: mav Date: Wed Aug 14 17:36:26 2019 New Revision: 351038 URL: https://svnweb.freebsd.org/changeset/base/351038 Log: Print few more useful identify fields. MFC after: 2 weeks Modified: head/sbin/nvmecontrol/identify.c head/sbin/nvmecontrol/identify_ext.c Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Wed Aug 14 17:17:52 2019 (r351037) +++ head/sbin/nvmecontrol/identify.c Wed Aug 14 17:36:26 2019 (r351038) @@ -62,6 +62,7 @@ static struct options { void print_namespace(struct nvme_namespace_data *nsdata) { + char cbuf[UINT128_DIG + 1]; uint32_t i; uint32_t lbaf, lbads, ms, rp; uint8_t thin_prov, ptype; @@ -73,15 +74,12 @@ print_namespace(struct nvme_namespace_data *nsdata) flbas_fmt = (nsdata->flbas >> NVME_NS_DATA_FLBAS_FORMAT_SHIFT) & NVME_NS_DATA_FLBAS_FORMAT_MASK; - printf("Size (in LBAs): %lld (%lldM)\n", - (long long)nsdata->nsze, - (long long)nsdata->nsze / 1024 / 1024); - printf("Capacity (in LBAs): %lld (%lldM)\n", - (long long)nsdata->ncap, - (long long)nsdata->ncap / 1024 / 1024); - printf("Utilization (in LBAs): %lld (%lldM)\n", - (long long)nsdata->nuse, - (long long)nsdata->nuse / 1024 / 1024); + printf("Size: %lld blocks\n", + (long long)nsdata->nsze); + printf("Capacity: %lld blocks\n", + (long long)nsdata->ncap); + printf("Utilization: %lld blocks\n", + (long long)nsdata->nuse); printf("Thin Provisioning: %s\n", thin_prov ? "Supported" : "Not Supported"); printf("Number of LBA Formats: %d\n", nsdata->nlbaf+1); @@ -148,7 +146,22 @@ print_namespace(struct nvme_namespace_data *nsdata) NVME_NS_DATA_DLFEAT_DWZ_MASK ? ", Write Zero" : "", (nsdata->dlfeat >> NVME_NS_DATA_DLFEAT_GCRC_SHIFT) & NVME_NS_DATA_DLFEAT_GCRC_MASK ? ", Guard CRC" : ""); - printf("Optimal I/O Boundary (LBAs): %u\n", nsdata->noiob); + printf("Optimal I/O Boundary: %u blocks\n", nsdata->noiob); + printf("NVM Capacity: %s bytes\n", + uint128_to_str(to128(nsdata->nvmcap), cbuf, sizeof(cbuf))); + if ((nsdata->nsfeat >> NVME_NS_DATA_NSFEAT_NPVALID_SHIFT) & + NVME_NS_DATA_NSFEAT_NPVALID_MASK) { + printf("Preferred Write Granularity: %u blocks", + nsdata->npwg + 1); + printf("Preferred Write Alignment: %u blocks", + nsdata->npwa + 1); + printf("Preferred Deallocate Granul: %u blocks", + nsdata->npdg + 1); + printf("Preferred Deallocate Align: %u blocks", + nsdata->npda + 1); + printf("Optimal Write Size: %u blocks", + nsdata->nows + 1); + } printf("Globally Unique Identifier: "); for (i = 0; i < sizeof(nsdata->nguid); i++) printf("%02x", nsdata->nguid[i]); Modified: head/sbin/nvmecontrol/identify_ext.c ============================================================================== --- head/sbin/nvmecontrol/identify_ext.c Wed Aug 14 17:17:52 2019 (r351037) +++ head/sbin/nvmecontrol/identify_ext.c Wed Aug 14 17:36:26 2019 (r351038) @@ -121,7 +121,7 @@ nvme_print_controller(struct nvme_controller_data *cda if (cdata->mdts == 0) printf("Unlimited\n"); else - printf("%ld\n", PAGE_SIZE * (1L << cdata->mdts)); + printf("%ld bytes\n", PAGE_SIZE * (1L << cdata->mdts)); printf("Controller ID: 0x%04x\n", cdata->ctrlr_id); printf("Version: %d.%d.%d\n", (cdata->ver >> 16) & 0xffff, (cdata->ver >> 8) & 0xff, @@ -184,6 +184,14 @@ nvme_print_controller(struct nvme_controller_data *cda ns_smart ? "Yes" : "No"); printf("Error Log Page Entries: %d\n", cdata->elpe+1); printf("Number of Power States: %d\n", cdata->npss+1); + if (cdata->ver >= 0x010200) { + printf("Total NVM Capacity: %s bytes\n", + uint128_to_str(to128(cdata->untncap.tnvmcap), + cbuf, sizeof(cbuf))); + printf("Unallocated NVM Capacity: %s bytes\n", + uint128_to_str(to128(cdata->untncap.unvmcap), + cbuf, sizeof(cbuf))); + } printf("\n"); printf("NVM Command Set Attributes\n"); @@ -235,13 +243,6 @@ nvme_print_controller(struct nvme_controller_data *cda (t == NVME_CTRLR_DATA_VWC_ALL_NO) ? ", no flush all" : (t == NVME_CTRLR_DATA_VWC_ALL_YES) ? ", flush all" : ""); - if (nsmgmt) { - printf("\n"); - printf("Namespace Drive Attributes\n"); - printf("==========================\n"); - printf("NVM total cap: %s\n", - uint128_to_str(to128(cdata->untncap.tnvmcap), cbuf, sizeof(cbuf))); - printf("NVM unallocated cap: %s\n", - uint128_to_str(to128(cdata->untncap.unvmcap), cbuf, sizeof(cbuf))); - } + if (cdata->ver >= 0x010201) + printf("\nNVM Subsystem Name: %.256s\n", cdata->subnqn); } From owner-svn-src-head@freebsd.org Wed Aug 14 18:04:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29595B4C95; Wed, 14 Aug 2019 18:04:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467yBs0KXmz3D1L; Wed, 14 Aug 2019 18:04:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E273D3E72; Wed, 14 Aug 2019 18:04:04 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7EI44OR090388; Wed, 14 Aug 2019 18:04:04 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EI44Ae090387; Wed, 14 Aug 2019 18:04:04 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908141804.x7EI44Ae090387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 14 Aug 2019 18:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351039 - head/tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/fusefs X-SVN-Commit-Revision: 351039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 18:04:05 -0000 Author: asomers Date: Wed Aug 14 18:04:04 2019 New Revision: 351039 URL: https://svnweb.freebsd.org/changeset/base/351039 Log: fusefs: fix intermittency in the default_permissions.Unlink.ok test The test needs to expect a FUSE_FORGET operation. Most of the time the test would pass anyway, because by chance FUSE_FORGET would arrive after the unmount. MFC after: 2 weeks MFC-With: 350665 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/fs/fusefs/default_permissions.cc Modified: head/tests/sys/fs/fusefs/default_permissions.cc ============================================================================== --- head/tests/sys/fs/fusefs/default_permissions.cc Wed Aug 14 17:36:26 2019 (r351038) +++ head/tests/sys/fs/fusefs/default_permissions.cc Wed Aug 14 18:04:04 2019 (r351039) @@ -40,6 +40,7 @@ extern "C" { #include #include +#include #include } @@ -1157,12 +1158,19 @@ TEST_F(Unlink, ok) const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt"; uint64_t ino = 42; + sem_t sem; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_getattr(FUSE_ROOT_ID, S_IFDIR | 0777, UINT64_MAX, 1); expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, geteuid()); expect_unlink(FUSE_ROOT_ID, RELPATH, 0); + expect_forget(ino, 1, &sem); ASSERT_EQ(0, unlink(FULLPATH)) << strerror(errno); + + sem_wait(&sem); + sem_destroy(&sem); } /* From owner-svn-src-head@freebsd.org Wed Aug 14 18:41:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0828B65FA; Wed, 14 Aug 2019 18:41:29 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467z214Cplz3H26; Wed, 14 Aug 2019 18:41:29 +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 726654580; Wed, 14 Aug 2019 18:41:29 +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 x7EIfTi2012781; Wed, 14 Aug 2019 18:41:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EIfT52012780; Wed, 14 Aug 2019 18:41:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908141841.x7EIfT52012780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Aug 2019 18:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351040 - head/lib/libcompiler_rt X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcompiler_rt X-SVN-Commit-Revision: 351040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 18:41:29 -0000 Author: emaste Date: Wed Aug 14 18:41:28 2019 New Revision: 351040 URL: https://svnweb.freebsd.org/changeset/base/351040 Log: compiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V As with other archs the compiler may emit calls to the byte swap routines under certain conditions. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/lib/libcompiler_rt/Makefile.inc Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Wed Aug 14 18:04:04 2019 (r351039) +++ head/lib/libcompiler_rt/Makefile.inc Wed Aug 14 18:41:28 2019 (r351040) @@ -234,7 +234,8 @@ SRCS+= sync_synchronize.S .endif # On some archs GCC-6.3 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \ + ${MACHINE_CPUARCH} == "sparc64" SRCS+= bswapdi2.c SRCS+= bswapsi2.c .endif From owner-svn-src-head@freebsd.org Wed Aug 14 18:52:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B52FBB6A73; Wed, 14 Aug 2019 18:52:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 467zGR6Sthz3Hlq; Wed, 14 Aug 2019 18:52:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-oi1-f170.google.com with SMTP id a21so1237276oie.4; Wed, 14 Aug 2019 11:52: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=otSiE591puna/7x+wu7f2ZN/pt6nrS+tO0Bs4nzILIc=; b=Tv/Vn+5xJERav4OqrcHjqLnECVyydJfp1Cfg5VBJZbPRxeHSZGTMWGC7DfMEMutCWT zUpn/PHGpoLL4/VFQqZjNzRKTVJfCqstOfu8KVHYLe6r1FDno5oE8tEhpXr2Q/RtcozB rOdMRtmoYRBqizmbtymABmMTQ71TTnkBfjouI9ttE0N98Dlc6U297DG5KbEld11n6SOg pc3HX5vhbF0dtnppbkGravY0EZeS30lSKyX++aLYJs7TwX6vKrQcX6st7VflGJi79AHA n8FpM6odQTYtc9yi6rjQhmid5F6lXHiWOBkvd7BMJUjsMXt+F+DSr7AobhmoWjOgelsX bzPw== X-Gm-Message-State: APjAAAVGEUbX1bhA4uJyUcVrq4taoyN5ZA0iETiUzEyRoSd9AP4s5ABZ S7g67Wu1fKnrIba3G7zLqgdKO2Czqb2zxyNZz2Q= X-Google-Smtp-Source: APXvYqwJfCZwf8BOzRD+f0M7kOjGe28Aanj2O/q3YAyDuWr1bXVlnzVs4Mg/8bArOdn1Rt0kzw+jR9o4UUzZqkNNJOw= X-Received: by 2002:a02:7c2:: with SMTP id f185mr850005jaf.16.1565808734814; Wed, 14 Aug 2019 11:52:14 -0700 (PDT) MIME-Version: 1.0 References: <201908141713.x7EHDb5b058493@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Wed, 14 Aug 2019 00:55:19 -0400 Message-ID: Subject: Re: svn commit: r351036 - head/share/man/man7 To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 467zGR6Sthz3Hlq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.167.170 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-4.26 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; RCVD_IN_DNSWL_NONE(0.00)[170.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.27)[ip: (-0.53), ipnet: 209.85.128.0/17(-3.37), asn: 15169(-2.39), country: US(-0.05)]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 18:52:16 -0000 On Wed, 14 Aug 2019 at 13:25, Warner Losh wrote: > > would using 'removed from the tree' be better here? Because that's the current plan of record. I originally had "removed" but then noticed your mail had 05-31 as the date for "svn rm all non-clang platforms not supported by in-tree LLVM or converted to ext toolchain". I didn't want to overwhelm with dates that might change. Maybe something like "may be removed from the tree after that date"? From owner-svn-src-head@freebsd.org Wed Aug 14 19:00:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B0A5B709C; Wed, 14 Aug 2019 19:00:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 467zSQ4HkZz3Jcf; Wed, 14 Aug 2019 19:00:54 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id xyVshsWkMIhW9xyVuhpd0Z; Wed, 14 Aug 2019 13:00:51 -0600 X-Authority-Analysis: v=2.3 cv=FcFJO626 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=FmdZ9Uzk2mMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=qSNgbIn8TdgJ77-XzEkA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 74B41A8C; Wed, 14 Aug 2019 12:00:46 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x7EJ0RiI058094; Wed, 14 Aug 2019 12:00:27 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x7EJ0RxC058082; Wed, 14 Aug 2019 12:00:27 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201908141900.x7EJ0RxC058082@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Hans Petter Selasky cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux In-reply-to: <201908140936.x7E9aQAc069612@repo.freebsd.org> References: <201908140936.x7E9aQAc069612@repo.freebsd.org> Comments: In-reply-to Hans Petter Selasky message dated "Wed, 14 Aug 2019 09:36:26 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 14 Aug 2019 12:00:27 -0700 X-CMAE-Envelope: MS4wfC3H+mnL/16vjHpJ+0OaL/u+h6spEiEC0l296TslFqlY4OqAKOmhAgg7ahaz+vE6km2jh0O6i8s6E7rpuUpSUgWTbkASoeYgWmWPcQd8F04ILlhU+rGC EVHeRss8yMVHtR1kouYRxIPqJbjTGb7hheJd4CW5BpVYuep9+MfqwssMdCsU3e2TzW1CLK29LFQvux6R6oAr7AYyNVEijn5JrjedXefXAnUSuhYbSYIhj7wU XHG+fGo1z6zHpsD5V713441M4agrm1dX/dbc1Y5TmUgUSydL2CLzgTpDpC/q+uvU X-Rspamd-Queue-Id: 467zSQ4HkZz3Jcf X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.947,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 19:00:55 -0000 In message <201908140936.x7E9aQAc069612@repo.freebsd.org>, Hans Petter Selasky writes: > Author: hselasky > Date: Wed Aug 14 09:36:25 2019 > New Revision: 351009 > URL: https://svnweb.freebsd.org/changeset/base/351009 > > Log: > Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI. > This patch makes the DRM graphics driver in ports usable on aarch64. > > Submitted by: Greg V > Differential Revision: https://reviews.freebsd.org/D21008 > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/device.h > head/sys/compat/linuxkpi/common/include/linux/interrupt.h > head/sys/compat/linuxkpi/common/include/linux/pci.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/device.h > ============================================================================= > = > --- head/sys/compat/linuxkpi/common/include/linux/device.h Wed Aug 14 06:4 > 1:22 2019 (r351008) > +++ head/sys/compat/linuxkpi/common/include/linux/device.h Wed Aug 14 09:3 > 6:25 2019 (r351009) > @@ -110,8 +110,8 @@ struct device { > void *driver_data; > unsigned int irq; > #define LINUX_IRQ_INVALID 65535 > - unsigned int msix; > - unsigned int msix_max; > + unsigned int irq_start; > + unsigned int irq_end; > const struct attribute_group **groups; > struct fwnode_handle *fwnode; > > > Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h > ============================================================================= > = > --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 06:4 > 1:22 2019 (r351008) > +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Aug 14 09:3 > 6:25 2019 (r351009) > @@ -55,9 +55,11 @@ struct irq_ent { > static inline int > linux_irq_rid(struct device *dev, unsigned int irq) > { > - if (irq == dev->irq) > + /* check for MSI- or MSIX- interrupt */ > + if (irq >= dev->irq_start && irq < dev->irq_end) > + return (irq - dev->irq_start + 1); > + else > return (0); > - return irq - dev->msix + 1; > } > > extern void linux_irq_handler(void *); > > Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h > ============================================================================= > = > --- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 06:4 > 1:22 2019 (r351008) > +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Aug 14 09:3 > 6:25 2019 (r351009) > @@ -228,6 +228,7 @@ struct pci_dev { > unsigned int devfn; > uint32_t class; > uint8_t revision; > + bool msi_enabled; > }; > > static inline struct resource_list_entry * > @@ -262,7 +263,7 @@ linux_pci_find_irq_dev(unsigned int irq) > spin_lock(&pci_lock); > list_for_each_entry(pdev, &pci_devices, links) { > if (irq == pdev->dev.irq || > - (irq >= pdev->dev.msix && irq < pdev->dev.msix_max)) { > + (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) { > found = &pdev->dev; > break; > } > @@ -424,10 +425,25 @@ pci_disable_msix(struct pci_dev *pdev) > * linux_pci_find_irq_dev() does no longer see them by > * resetting their references to zero: > */ > - pdev->dev.msix = 0; > - pdev->dev.msix_max = 0; > + pdev->dev.irq_start = 0; > + pdev->dev.irq_end = 0; > } > > +#define pci_disable_msi(pdev) \ > + linux_pci_disable_msi(pdev) > + > +static inline void > +linux_pci_disable_msi(struct pci_dev *pdev) > +{ > + > + pci_release_msi(pdev->dev.bsddev); > + > + pdev->dev.irq_start = 0; > + pdev->dev.irq_end = 0; > + pdev->irq = pdev->dev.irq; > + pdev->msi_enabled = false; > +} > + > unsigned long pci_resource_start(struct pci_dev *pdev, int bar); > unsigned long pci_resource_len(struct pci_dev *pdev, int bar); > > @@ -562,10 +578,10 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr > return avail; > } > rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); > - pdev->dev.msix = rle->start; > - pdev->dev.msix_max = rle->start + avail; > + pdev->dev.irq_start = rle->start; > + pdev->dev.irq_end = rle->start + avail; > for (i = 0; i < nreq; i++) > - entries[i].vector = pdev->dev.msix + i; > + entries[i].vector = pdev->dev.irq_start + i; > return (0); > } > > @@ -593,6 +609,32 @@ pci_enable_msix_range(struct pci_dev *dev, struct msix > } > } while (rc); > return (nvec); > +} > + > +#define pci_enable_msi(pdev) \ > + linux_pci_enable_msi(pdev) > + > +static inline int > +pci_enable_msi(struct pci_dev *pdev) > +{ > + struct resource_list_entry *rle; > + int error; > + int avail; > + > + avail = pci_msi_count(pdev->dev.bsddev); > + if (avail < 1) > + return -EINVAL; > + > + avail = 1; /* this function only enable one MSI IRQ */ > + if ((error = -pci_alloc_msi(pdev->dev.bsddev, &avail)) != 0) > + return error; > + > + rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 1); > + pdev->dev.irq_start = rle->start; > + pdev->dev.irq_end = rle->start + avail; > + pdev->irq = rle->start; > + pdev->msi_enabled = true; > + return (0); > } > > static inline int > John's patch to drm-current-kmod (ports r508877) works! This broke drm-current-kmod. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Aug 14 19:07:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09550B747D; Wed, 14 Aug 2019 19:07:07 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 467zbZ6Tgnz3K7j; Wed, 14 Aug 2019 19:07:06 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3D1242602AB; Wed, 14 Aug 2019 21:07:04 +0200 (CEST) Subject: Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201908140936.x7E9aQAc069612@repo.freebsd.org> <201908141900.x7EJ0RxC058082@slippy.cwsent.com> From: Hans Petter Selasky Message-ID: <48113a1f-d19b-0d18-937c-fd302ac2650e@freebsd.org> Date: Wed, 14 Aug 2019 21:06:24 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201908141900.x7EJ0RxC058082@slippy.cwsent.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 467zbZ6Tgnz3K7j X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.914,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 19:07:07 -0000 On 2019-08-14 21:00, Cy Schubert wrote: > John's patch to drm-current-kmod (ports r508877) works! This broke > drm-current-kmod. You need to update the port. This patch should have been tested too. Did you try that first? --HPS From owner-svn-src-head@freebsd.org Wed Aug 14 19:24:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9CB1B80A3; Wed, 14 Aug 2019 19:24:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 467zzw1rMKz3LdF; Wed, 14 Aug 2019 19:24:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id xysyhskIMIhW9xyt0hpies; Wed, 14 Aug 2019 13:24:42 -0600 X-Authority-Analysis: v=2.3 cv=FcFJO626 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=FmdZ9Uzk2mMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=AjBU14ukJLDlkBagOysA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from 5CG5030TVK-N.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 423ADAD8; Wed, 14 Aug 2019 12:24:40 -0700 (PDT) Date: Wed, 14 Aug 2019 12:24:19 -0700 In-Reply-To: <48113a1f-d19b-0d18-937c-fd302ac2650e@freebsd.org> References: <201908140936.x7E9aQAc069612@repo.freebsd.org> <201908141900.x7EJ0RxC058082@slippy.cwsent.com> <48113a1f-d19b-0d18-937c-fd302ac2650e@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: <70C15A2D-4D6F-424F-8993-606C3FC04B51@cschubert.com> X-CMAE-Envelope: MS4wfHDRgaKuefpk7NAUeu0igU2YJFwyK+W/MyMWVfZv4ci7BqMGOXw51SPbyjLkKmetbwdQyxJ6zs7Mwxr2nWMRtf0XfMLHUQW9HE2VGUDvlHLDvYUKuMwm jQRnpxryVSVeWk37nlwrl7e7xXELO92sh7hH2E+un02w//Wp2vmjuKoBJQACa/Jn49hXuZDXXaG5M3nbFsD+MBNhzOX1LH/b3ECXn6F0dufMNm1/gwLstOm4 HW3VAnVJp/870maPv31Pq+50DIrNHdBT1CkVSzyST8r9D4mjWZ5RauzNkHHd5OF5 X-Rspamd-Queue-Id: 467zzw1rMKz3LdF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.928,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 19:24:44 -0000 On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky wrote: >On 2019-08-14 21:00, Cy Schubert wrote: >> John's patch to drm-current-kmod (ports r508877) works! This broke >> drm-current-kmod=2E > >You need to update the port=2E This patch should have been tested too=2E > >Did you try that first? > >--HPS The port is up to date=2E Sorry for not attaching output=2E I was in a rus= h to get back to $JOB=2E I'll rerun it tonight=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-head@freebsd.org Wed Aug 14 19:47:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E38F9B8B78 for ; Wed, 14 Aug 2019 19:47:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 4680Vj0L3Dz3Msk for ; Wed, 14 Aug 2019 19:47:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id l9so111417416qtu.6 for ; Wed, 14 Aug 2019 12:47:56 -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=XZUQcIs3MzhnMj85uO6PmAJ2Ju/0JCdTO19hf1mB0Ac=; b=ALP9taWO2RPQUnAiE6ZnmnTJKOhaM50tGqgmbA3lspZ4usbsK32Bw3wzKcnRiIe8Db FUkK3/IdDYpHmF5E7aFgkPjCDU+aV0Ml3D49fHzawb3u8fndztpxdGxkhBBE6R8HitIV rJqaxAzYR5s87L+FJ1Ce88RUa8IDpMBNh2hyx/PX5/0HTdn/UBeFEL3kEduQUyugzi6i MUkVgflPYPVraOI+OuIUoB1WGZhV0nS4p1SVXe+6x1+abOVi/3c0h6rxhi0kBP68i6/l uM2P0vVi3XGDqYqh2KiDiae8JBmfxBTWPvf/GAC/eexIoiwCmTVXu6cr09Q38atP5beC QRDw== 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=XZUQcIs3MzhnMj85uO6PmAJ2Ju/0JCdTO19hf1mB0Ac=; b=h5/Wvaj6ZMOlvVA+vxv1vS0TV0EzyX4vQDPSLnhXmEGoLNgRlWzyvJ5bhMoK5LV7+F tMWIeWeOD2cb/UcnQkfde7Q5R+h0Arb5DyIxnyOPJYNaDcmi2SmCh3e3rN2uL6YbFfPH UNhRXUAHikur/2LQKrHbdIkf1mN9Sqf58QA42gKGSukLhLEWJn/GRzUBadu7hJmX3fHK xsZSXbzCprkqIhbqCr4IyZ+2usRsPhIK67+Nbkluys8UbuANKWbLnnkkq7l7GOHtjZmO UohRXT2GzVVFKE+99DDneENLuC2piww0hchqqlN8fGecBxzw2JEJstR0wkzfOKdcmS/K d3Cw== X-Gm-Message-State: APjAAAVdcsW2CFv8eaFXnY9FyfpRIEKYVQ/EgyppwwJVQE0khRBVTTV+ 7jkvnd278sTVGen5KNgVMdurjXSOAcefNO3outFb0A== X-Google-Smtp-Source: APXvYqz5a5b6l7RHRpRHMfltvnS1xQnfWzRxWK/FRFgUCtdqi03hlGVf6FZ2PmEmQd3CC/cXo2Ye5Y2A3zjrhlHdYIw= X-Received: by 2002:ac8:140a:: with SMTP id k10mr925882qtj.175.1565812075822; Wed, 14 Aug 2019 12:47:55 -0700 (PDT) MIME-Version: 1.0 References: <201908141713.x7EHDb5b058493@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 14 Aug 2019 13:47:45 -0600 Message-ID: Subject: Re: svn commit: r351036 - head/share/man/man7 To: Ed Maste Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4680Vj0L3Dz3Msk X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ALP9taWO; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::833) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-5.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; 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(-1.00)[-0.996,0]; RCVD_IN_DNSWL_NONE(0.00)[3.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.95)[ip: (-9.34), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.39), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 19:47:58 -0000 On Wed, Aug 14, 2019 at 12:52 PM Ed Maste wrote: > On Wed, 14 Aug 2019 at 13:25, Warner Losh wrote: > > > > would using 'removed from the tree' be better here? Because that's the > current plan of record. > > I originally had "removed" but then noticed your mail had 05-31 as the > date for "svn rm all non-clang platforms not supported by in-tree LLVM > or converted to ext toolchain". I didn't want to overwhelm with dates > that might change. Maybe something like "may be removed from the tree > after that date"? > That works. I want the threat of removal to be there, though honestly I don't think it will matter. nobody is going to step up and do it. Warner From owner-svn-src-head@freebsd.org Wed Aug 14 20:45:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60F3DBA879; Wed, 14 Aug 2019 20:45:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4681mY1xB3z3wcm; Wed, 14 Aug 2019 20:45:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2070F5B6F; Wed, 14 Aug 2019 20:45:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7EKj0Y3086050; Wed, 14 Aug 2019 20:45:00 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKj0eu086047; Wed, 14 Aug 2019 20:45:00 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908142045.x7EKj0eu086047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 14 Aug 2019 20:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351042 - in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Commit-Revision: 351042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:45:01 -0000 Author: asomers Date: Wed Aug 14 20:45:00 2019 New Revision: 351042 URL: https://svnweb.freebsd.org/changeset/base/351042 Log: fusefs: Fix the size of fuse_getattr_in In FUSE protocol 7.9, the size of the FUSE_GETATTR request has increased. However, the fusefs driver is currently not sending the additional fields. In our implementation, the additional fields are always zero, so I there haven't been any test failures until now. But fusefs-lkl requires the request's length to be correct. Fix this bug, and also enhance the test suite to catch similar bugs. PR: 239830 MFC after: 2 weeks MFC-With: 350665 Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/fuse/fuse_internal.c head/tests/sys/fs/fusefs/getattr.cc head/tests/sys/fs/fusefs/mockfs.cc head/tests/sys/fs/fusefs/mockfs.hh Modified: head/sys/fs/fuse/fuse_internal.c ============================================================================== --- head/sys/fs/fuse/fuse_internal.c Wed Aug 14 19:21:26 2019 (r351041) +++ head/sys/fs/fuse/fuse_internal.c Wed Aug 14 20:45:00 2019 (r351042) @@ -868,7 +868,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt enum vtype vtyp; int err; - fdisp_init(&fdi, 0); + fdisp_init(&fdi, sizeof(*fgai)); fdisp_make_vp(&fdi, FUSE_GETATTR, vp, td, cred); fgai = fdi.indata; /* @@ -877,7 +877,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt * care. */ fgai->getattr_flags = 0; - if ((err = fdisp_simple_putget_vp(&fdi, FUSE_GETATTR, vp, td, cred))) { + if ((err = fdisp_wait_answ(&fdi))) { if (err == ENOENT) fuse_internal_vnode_disappear(vp); goto out; Modified: head/tests/sys/fs/fusefs/getattr.cc ============================================================================== --- head/tests/sys/fs/fusefs/getattr.cc Wed Aug 14 19:21:26 2019 (r351041) +++ head/tests/sys/fs/fusefs/getattr.cc Wed Aug 14 20:45:00 2019 (r351042) @@ -195,6 +195,7 @@ TEST_F(Getattr, ok) EXPECT_CALL(*m_mock, process( ResultOf([](auto in) { return (in.header.opcode == FUSE_GETATTR && + in.body.getattr.getattr_flags == 0 && in.header.nodeid == ino); }, Eq(true)), _) Modified: head/tests/sys/fs/fusefs/mockfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.cc Wed Aug 14 19:21:26 2019 (r351041) +++ head/tests/sys/fs/fusefs/mockfs.cc Wed Aug 14 20:45:00 2019 (r351042) @@ -467,6 +467,156 @@ MockFS::~MockFS() { close(m_kq); } +void MockFS::audit_request(const mockfs_buf_in &in) { + uint32_t inlen = in.header.len; + size_t fih = sizeof(in.header); + switch (in.header.opcode) { + case FUSE_LOOKUP: + case FUSE_RMDIR: + case FUSE_SYMLINK: + case FUSE_UNLINK: + ASSERT_GT(inlen, fih) << "Missing request filename"; + break; + case FUSE_FORGET: + ASSERT_EQ(inlen, fih + sizeof(in.body.forget)); + break; + case FUSE_GETATTR: + ASSERT_EQ(inlen, fih + sizeof(in.body.getattr)); + break; + case FUSE_SETATTR: + ASSERT_EQ(inlen, fih + sizeof(in.body.setattr)); + break; + case FUSE_READLINK: + ASSERT_EQ(inlen, fih) << "Unexpected request body"; + break; + case FUSE_MKNOD: + { + size_t s; + if (m_kernel_minor_version >= 12) + s = sizeof(in.body.mknod); + else + s = FUSE_COMPAT_MKNOD_IN_SIZE; + ASSERT_GE(inlen, fih + s) << "Missing request body"; + ASSERT_GT(inlen, fih + s) << "Missing request filename"; + break; + } + case FUSE_MKDIR: + ASSERT_GE(inlen, fih + sizeof(in.body.mkdir)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.mkdir)) << + "Missing request filename"; + break; + case FUSE_RENAME: + ASSERT_GE(inlen, fih + sizeof(in.body.rename)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.rename)) << + "Missing request filename"; + break; + case FUSE_LINK: + ASSERT_GE(inlen, fih + sizeof(in.body.link)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.link)) << + "Missing request filename"; + break; + case FUSE_OPEN: + ASSERT_EQ(inlen, fih + sizeof(in.body.open)); + break; + case FUSE_READ: + ASSERT_EQ(inlen, fih + sizeof(in.body.read)); + break; + case FUSE_WRITE: + { + size_t s; + + if (m_kernel_minor_version >= 9) + s = sizeof(in.body.write); + else + s = FUSE_COMPAT_WRITE_IN_SIZE; + ASSERT_GE(inlen, fih + s) << "Missing request body"; + // I suppose a 0-byte write should be allowed + break; + } + case FUSE_DESTROY: + case FUSE_STATFS: + ASSERT_EQ(inlen, fih); + break; + case FUSE_RELEASE: + ASSERT_EQ(inlen, fih + sizeof(in.body.release)); + break; + case FUSE_FSYNC: + case FUSE_FSYNCDIR: + ASSERT_EQ(inlen, fih + sizeof(in.body.fsync)); + break; + case FUSE_SETXATTR: + ASSERT_GE(inlen, fih + sizeof(in.body.setxattr)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.setxattr)) << + "Missing request attribute name"; + break; + case FUSE_GETXATTR: + ASSERT_GE(inlen, fih + sizeof(in.body.setxattr)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.setxattr)) << + "Missing request attribute name"; + break; + case FUSE_LISTXATTR: + ASSERT_GE(inlen, fih + sizeof(in.body.listxattr)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.listxattr)) << + "Missing namespace"; + break; + case FUSE_REMOVEXATTR: + ASSERT_GT(inlen, fih) << "Missing request attribute name"; + break; + case FUSE_FLUSH: + ASSERT_EQ(inlen, fih + sizeof(in.body.flush)); + break; + case FUSE_INIT: + ASSERT_EQ(inlen, fih + sizeof(in.body.init)); + break; + case FUSE_OPENDIR: + ASSERT_EQ(inlen, fih + sizeof(in.body.opendir)); + break; + case FUSE_READDIR: + ASSERT_EQ(inlen, fih + sizeof(in.body.readdir)); + break; + case FUSE_RELEASEDIR: + ASSERT_EQ(inlen, fih + sizeof(in.body.releasedir)); + break; + case FUSE_GETLK: + ASSERT_EQ(inlen, fih + sizeof(in.body.getlk)); + break; + case FUSE_SETLK: + case FUSE_SETLKW: + ASSERT_EQ(inlen, fih + sizeof(in.body.setlk)); + break; + case FUSE_ACCESS: + ASSERT_EQ(inlen, fih + sizeof(in.body.access)); + break; + case FUSE_CREATE: + ASSERT_GE(inlen, fih + sizeof(in.body.create)) << + "Missing request body"; + ASSERT_GT(inlen, fih + sizeof(in.body.create)) << + "Missing request filename"; + break; + case FUSE_INTERRUPT: + ASSERT_EQ(inlen, fih + sizeof(in.body.interrupt)); + break; + case FUSE_BMAP: + ASSERT_EQ(inlen, fih + sizeof(in.body.bmap)); + break; + case FUSE_NOTIFY_REPLY: + case FUSE_BATCH_FORGET: + case FUSE_FALLOCATE: + case FUSE_IOCTL: + case FUSE_POLL: + case FUSE_READDIRPLUS: + FAIL() << "Unsupported opcode?"; + default: + FAIL() << "Unknown opcode " << in.header.opcode; + } +} + void MockFS::init(uint32_t flags) { std::unique_ptr in(new mockfs_buf_in); std::unique_ptr out(new mockfs_buf_out); @@ -515,6 +665,7 @@ void MockFS::loop() { break; if (verbosity > 0) debug_request(*in); + audit_request(*in); if (pid_ok((pid_t)in->header.pid)) { process(*in, out); } else { @@ -686,6 +837,12 @@ void MockFS::read_request(mockfs_buf_in &in) { m_quit = true; } ASSERT_TRUE(res >= static_cast(sizeof(in.header)) || m_quit); + /* + * Inconsistently, fuse_in_header.len is the size of the entire + * request,including header, even though fuse_out_header.len excludes + * the size of the header. + */ + ASSERT_TRUE(res == in.header.len || m_quit); } void MockFS::write_response(const mockfs_buf_out &out) { Modified: head/tests/sys/fs/fusefs/mockfs.hh ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.hh Wed Aug 14 19:21:26 2019 (r351041) +++ head/tests/sys/fs/fusefs/mockfs.hh Wed Aug 14 20:45:00 2019 (r351042) @@ -145,6 +145,7 @@ union fuse_payloads_in { fuse_fsync_in fsync; fuse_fsync_in fsyncdir; fuse_forget_in forget; + fuse_getattr_in getattr; fuse_interrupt_in interrupt; fuse_lk_in getlk; fuse_getxattr_in getxattr; @@ -282,6 +283,7 @@ class MockFS { /* Timestamp granularity in nanoseconds */ unsigned m_time_gran; + void audit_request(const mockfs_buf_in &in); void debug_request(const mockfs_buf_in&); void debug_response(const mockfs_buf_out&); From owner-svn-src-head@freebsd.org Wed Aug 14 20:57:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A62A5BAF32; Wed, 14 Aug 2019 20:57:55 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46823R3VtRz3xPX; Wed, 14 Aug 2019 20:57:55 +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 59F3B5D45; Wed, 14 Aug 2019 20:57:55 +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 x7EKvtpb092038; Wed, 14 Aug 2019 20:57:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKvs2e092035; Wed, 14 Aug 2019 20:57:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142057.x7EKvs2e092035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351043 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:57:55 -0000 Author: imp Date: Wed Aug 14 20:57:54 2019 New Revision: 351043 URL: https://svnweb.freebsd.org/changeset/base/351043 Log: Move the identical x86 lines to files.x86 Move all the identical x86 lines to files.x86. The non-identical ones should be unified and moved as well, but that would require additional changes that would need a more careful review and may not be MFCable, so I'll do them separately. I'll delete the mildly snarky comment when things are unified. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:45:00 2019 (r351042) +++ head/sys/conf/files.amd64 Wed Aug 14 20:57:54 2019 (r351043) @@ -164,9 +164,6 @@ amd64/pci/pci_cfgreg.c optional pci cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S optional zfs | dtrace compile-with "${ZFS_S}" cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/amd64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" -cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" -cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" crypto/aesni/aeskeys_amd64.S optional aesni crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ @@ -612,7 +609,6 @@ isa/vga_isa.c optional vga kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/link_elf_obj.c standard -libkern/x86/crc32_sse42.c standard # # IA32 binary support # @@ -680,72 +676,20 @@ contrib/x86emu/x86emu.c optional x86bios | dpms | pci # dev/bvm/bvm_console.c optional bvmconsole dev/bvm/bvm_dbg.c optional bvmdebug -# -# x86 shared code between IA32 and AMD64 architectures -# -x86/acpica/OsdEnvironment.c optional acpi -x86/acpica/acpi_apm.c optional acpi -x86/acpica/acpi_wakeup.c optional acpi +# Common files where we currently configure the system differently, but perhaps shouldn't +# config(8) doesn't have a way to force standard options, so we've been inconsistent +# about marking non-optional things 'standard'. x86/acpica/madt.c optional acpi -x86/acpica/srat.c optional acpi -x86/bios/smbios.c optional smbios -x86/bios/vpd.c optional vpd -x86/cpufreq/powernow.c optional cpufreq -x86/cpufreq/est.c optional cpufreq -x86/cpufreq/hwpstate.c optional cpufreq -x86/cpufreq/p4tcc.c optional cpufreq -x86/iommu/busdma_dmar.c optional acpi acpi_dmar pci -x86/iommu/intel_ctx.c optional acpi acpi_dmar pci -x86/iommu/intel_drv.c optional acpi acpi_dmar pci -x86/iommu/intel_fault.c optional acpi acpi_dmar pci -x86/iommu/intel_gas.c optional acpi acpi_dmar pci -x86/iommu/intel_idpgtbl.c optional acpi acpi_dmar pci -x86/iommu/intel_intrmap.c optional acpi acpi_dmar pci -x86/iommu/intel_qi.c optional acpi acpi_dmar pci -x86/iommu/intel_quirks.c optional acpi acpi_dmar pci -x86/iommu/intel_utils.c optional acpi acpi_dmar pci x86/isa/atpic.c optional atpic isa -x86/isa/atrtc.c standard -x86/isa/clock.c standard x86/isa/elcr.c optional atpic isa | mptable x86/isa/isa.c standard x86/isa/isa_dma.c standard -x86/isa/nmi.c standard -x86/isa/orm.c optional isa -x86/pci/pci_bus.c optional pci x86/pci/pci_early_quirks.c optional pci -x86/pci/qpi.c optional pci -x86/x86/autoconf.c standard -x86/x86/bus_machdep.c standard -x86/x86/busdma_bounce.c standard -x86/x86/busdma_machdep.c standard -x86/x86/cpu_machdep.c standard -x86/x86/dump_machdep.c standard -x86/x86/fdt_machdep.c optional fdt -x86/x86/identcpu.c standard -x86/x86/intr_machdep.c standard x86/x86/io_apic.c standard -x86/x86/legacy.c standard x86/x86/local_apic.c standard -x86/x86/mca.c standard -x86/x86/x86_mem.c optional mem x86/x86/mptable.c optional mptable x86/x86/mptable_pci.c optional mptable pci -x86/x86/mp_x86.c optional smp -x86/x86/mp_watchdog.c optional mp_watchdog smp x86/x86/msi.c optional pci -x86/x86/nexus.c standard -x86/x86/pvclock.c standard -x86/x86/stack_machdep.c optional ddb | stack -x86/x86/tsc.c standard -x86/x86/ucode.c standard -x86/x86/delay.c standard -x86/xen/hvm.c optional xenhvm -x86/xen/xen_intr.c optional xenhvm x86/xen/pv.c optional xenhvm x86/xen/pvcpu_enum.c optional xenhvm -x86/xen/xen_apic.c optional xenhvm -x86/xen/xenpv.c optional xenhvm -x86/xen/xen_nexus.c optional xenhvm -x86/xen/xen_msi.c optional xenhvm x86/xen/xen_pci_bus.c optional xenhvm Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:45:00 2019 (r351042) +++ head/sys/conf/files.i386 Wed Aug 14 20:57:54 2019 (r351043) @@ -80,9 +80,6 @@ hptrr_lib.o optional hptrr \ cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs | dtrace compile-with "${ZFS_S}" cddl/dev/dtrace/i386/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/i386/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" -cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" -cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs compat/linux/linux_event.c optional compat_linux @@ -519,7 +516,6 @@ libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard -libkern/x86/crc32_sse42.c standard # # x86 real mode BIOS support, required by dpms/pci/vesa # @@ -529,69 +525,17 @@ compat/x86bios/x86bios.c optional x86bios | dpms | pci # dev/bvm/bvm_console.c optional bvmconsole dev/bvm/bvm_dbg.c optional bvmdebug -# -# x86 shared code between IA32 and AMD64 architectures -# -x86/acpica/OsdEnvironment.c optional acpi -x86/acpica/acpi_apm.c optional acpi -x86/acpica/acpi_wakeup.c optional acpi +# Common files where we currently configure the system differently, but perhaps shouldn't +# config(8) doesn't have a way to force standard options, so we've been inconsistent +# about marking non-optional things 'standard'. x86/acpica/madt.c optional acpi apic -x86/acpica/srat.c optional acpi -x86/bios/smbios.c optional smbios -x86/bios/vpd.c optional vpd -x86/cpufreq/est.c optional cpufreq -x86/cpufreq/hwpstate.c optional cpufreq -x86/cpufreq/p4tcc.c optional cpufreq -x86/cpufreq/powernow.c optional cpufreq x86/cpufreq/smist.c optional cpufreq -x86/iommu/busdma_dmar.c optional acpi acpi_dmar pci -x86/iommu/intel_ctx.c optional acpi acpi_dmar pci -x86/iommu/intel_drv.c optional acpi acpi_dmar pci -x86/iommu/intel_fault.c optional acpi acpi_dmar pci -x86/iommu/intel_gas.c optional acpi acpi_dmar pci -x86/iommu/intel_idpgtbl.c optional acpi acpi_dmar pci -x86/iommu/intel_intrmap.c optional acpi acpi_dmar pci -x86/iommu/intel_qi.c optional acpi acpi_dmar pci -x86/iommu/intel_quirks.c optional acpi acpi_dmar pci -x86/iommu/intel_utils.c optional acpi acpi_dmar pci x86/isa/atpic.c optional atpic -x86/isa/atrtc.c standard -x86/isa/clock.c standard x86/isa/elcr.c optional atpic | apic x86/isa/isa.c optional isa x86/isa/isa_dma.c optional isa -x86/isa/nmi.c standard -x86/isa/orm.c optional isa -x86/pci/pci_bus.c optional pci -x86/pci/qpi.c optional pci -x86/x86/autoconf.c standard -x86/x86/bus_machdep.c standard -x86/x86/busdma_bounce.c standard -x86/x86/busdma_machdep.c standard -x86/x86/cpu_machdep.c standard -x86/x86/dump_machdep.c standard -x86/x86/fdt_machdep.c optional fdt -x86/x86/identcpu.c standard -x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic -x86/x86/legacy.c standard x86/x86/local_apic.c optional apic -x86/x86/mca.c standard -x86/x86/x86_mem.c optional mem x86/x86/mptable.c optional apic x86/x86/mptable_pci.c optional apic pci -x86/x86/mp_x86.c optional smp -x86/x86/mp_watchdog.c optional mp_watchdog smp x86/x86/msi.c optional apic pci -x86/x86/nexus.c standard -x86/x86/stack_machdep.c optional ddb | stack -x86/x86/tsc.c standard -x86/x86/ucode.c standard -x86/x86/pvclock.c standard -x86/x86/delay.c standard -x86/xen/hvm.c optional xenhvm -x86/xen/xen_intr.c optional xenhvm -x86/xen/xen_apic.c optional xenhvm -x86/xen/xenpv.c optional xenhvm -x86/xen/xen_nexus.c optional xenhvm -x86/xen/xen_msi.c optional xenhvm Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:45:00 2019 (r351042) +++ head/sys/conf/files.x86 Wed Aug 14 20:57:54 2019 (r351043) @@ -8,7 +8,68 @@ # any other architecture we support. # +cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard +libkern/x86/crc32_sse42.c standard +# +# x86 shared code between IA32 and AMD64 architectures +# +x86/acpica/OsdEnvironment.c optional acpi +x86/acpica/acpi_apm.c optional acpi +x86/acpica/acpi_wakeup.c optional acpi +x86/acpica/srat.c optional acpi +x86/bios/smbios.c optional smbios +x86/bios/vpd.c optional vpd +x86/cpufreq/est.c optional cpufreq +x86/cpufreq/hwpstate.c optional cpufreq +x86/cpufreq/p4tcc.c optional cpufreq +x86/cpufreq/powernow.c optional cpufreq +x86/iommu/busdma_dmar.c optional acpi acpi_dmar pci +x86/iommu/intel_ctx.c optional acpi acpi_dmar pci +x86/iommu/intel_drv.c optional acpi acpi_dmar pci +x86/iommu/intel_fault.c optional acpi acpi_dmar pci +x86/iommu/intel_gas.c optional acpi acpi_dmar pci +x86/iommu/intel_idpgtbl.c optional acpi acpi_dmar pci +x86/iommu/intel_intrmap.c optional acpi acpi_dmar pci +x86/iommu/intel_qi.c optional acpi acpi_dmar pci +x86/iommu/intel_quirks.c optional acpi acpi_dmar pci +x86/iommu/intel_utils.c optional acpi acpi_dmar pci +x86/isa/atrtc.c standard +x86/isa/clock.c standard +x86/isa/isa.c optional isa +x86/isa/isa_dma.c optional isa +x86/isa/nmi.c standard +x86/isa/orm.c optional isa +x86/pci/pci_bus.c optional pci +x86/pci/qpi.c optional pci +x86/x86/autoconf.c standard +x86/x86/bus_machdep.c standard +x86/x86/busdma_bounce.c standard +x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard +x86/x86/dump_machdep.c standard +x86/x86/fdt_machdep.c optional fdt +x86/x86/identcpu.c standard +x86/x86/intr_machdep.c standard +x86/x86/legacy.c standard +x86/x86/mca.c standard +x86/x86/x86_mem.c optional mem +x86/x86/mp_x86.c optional smp +x86/x86/mp_watchdog.c optional mp_watchdog smp +x86/x86/nexus.c standard +x86/x86/pvclock.c standard +x86/x86/stack_machdep.c optional ddb | stack +x86/x86/tsc.c standard +x86/x86/ucode.c standard +x86/x86/delay.c standard +x86/xen/hvm.c optional xenhvm +x86/xen/xen_intr.c optional xenhvm +x86/xen/xen_apic.c optional xenhvm +x86/xen/xenpv.c optional xenhvm +x86/xen/xen_msi.c optional xenhvm +x86/xen/xen_nexus.c optional xenhvm From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F175BAF6D; Wed, 14 Aug 2019 20:58:02 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46823Z0PvHz3xWR; Wed, 14 Aug 2019 20:58:02 +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 E49905D46; Wed, 14 Aug 2019 20:58:01 +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 x7EKw10o092098; Wed, 14 Aug 2019 20:58:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKw1Rm092096; Wed, 14 Aug 2019 20:58:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKw1Rm092096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351044 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:02 -0000 Author: imp Date: Wed Aug 14 20:58:01 2019 New Revision: 351044 URL: https://svnweb.freebsd.org/changeset/base/351044 Log: Move all the hp* drivers too files.x86 The HPT drivers are all x86 only. Move them to files.x86. Because of the way we run uudecode, we can use $M instead of needing entries for them in separate files. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:57:54 2019 (r351043) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:01 2019 (r351044) @@ -82,26 +82,6 @@ atkbdmap.h optional atkbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # -hpt27xx_lib.o optional hpt27xx \ - dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ - compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ - no-implicit-rule -# -hptmvraid.o optional hptmv \ - dependency "$S/dev/hptmv/amd64-elf.raid.o.uu" \ - compile-with "uudecode < $S/dev/hptmv/amd64-elf.raid.o.uu" \ - no-implicit-rule -# -hptnr_lib.o optional hptnr \ - dependency "$S/dev/hptnr/amd64-elf.hptnr_lib.o.uu" \ - compile-with "uudecode < $S/dev/hptnr/amd64-elf.hptnr_lib.o.uu" \ - no-implicit-rule -# -hptrr_lib.o optional hptrr \ - dependency "$S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \ - compile-with "uudecode < $S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \ - no-implicit-rule -# amd64/acpica/acpi_machdep.c optional acpi acpi_wakecode.o optional acpi \ dependency "$S/amd64/acpica/acpi_wakecode.S assym.inc" \ @@ -290,20 +270,6 @@ dev/ixl/i40e_dcb.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/gpio/bytgpio.c optional bytgpio dev/gpio/chvgpio.c optional chvgpio -dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx -dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx -dev/hpt27xx/hpt27xx_config.c optional hpt27xx -dev/hptmv/entry.c optional hptmv -dev/hptmv/mv.c optional hptmv -dev/hptmv/gui_lib.c optional hptmv -dev/hptmv/hptproc.c optional hptmv -dev/hptmv/ioctl.c optional hptmv -dev/hptnr/hptnr_os_bsd.c optional hptnr -dev/hptnr/hptnr_osm_bsd.c optional hptnr -dev/hptnr/hptnr_config.c optional hptnr -dev/hptrr/hptrr_os_bsd.c optional hptrr -dev/hptrr/hptrr_osm_bsd.c optional hptrr -dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:57:54 2019 (r351043) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:01 2019 (r351044) @@ -57,26 +57,6 @@ atkbdmap.h optional atkbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "atkbdmap.h" # -hpt27xx_lib.o optional hpt27xx \ - dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ - compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ - no-implicit-rule -# -hptmvraid.o optional hptmv \ - dependency "$S/dev/hptmv/i386-elf.raid.o.uu" \ - compile-with "uudecode < $S/dev/hptmv/i386-elf.raid.o.uu" \ - no-implicit-rule -# -hptnr_lib.o optional hptnr \ - dependency "$S/dev/hptnr/i386-elf.hptnr_lib.o.uu" \ - compile-with "uudecode < $S/dev/hptnr/i386-elf.hptnr_lib.o.uu" \ - no-implicit-rule -# -hptrr_lib.o optional hptrr \ - dependency "$S/dev/hptrr/i386-elf.hptrr_lib.o.uu" \ - compile-with "uudecode < $S/dev/hptrr/i386-elf.hptrr_lib.o.uu" \ - no-implicit-rule -# cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs | dtrace compile-with "${ZFS_S}" cddl/dev/dtrace/i386/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/i386/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" @@ -204,20 +184,6 @@ dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb dev/gpio/bytgpio.c optional bytgpio dev/gpio/chvgpio.c optional chvgpio -dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx -dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx -dev/hpt27xx/hpt27xx_config.c optional hpt27xx -dev/hptmv/entry.c optional hptmv -dev/hptmv/mv.c optional hptmv -dev/hptmv/gui_lib.c optional hptmv -dev/hptmv/hptproc.c optional hptmv -dev/hptmv/ioctl.c optional hptmv -dev/hptnr/hptnr_os_bsd.c optional hptnr -dev/hptnr/hptnr_osm_bsd.c optional hptnr -dev/hptnr/hptnr_config.c optional hptnr -dev/hptrr/hptrr_os_bsd.c optional hptrr -dev/hptrr/hptrr_osm_bsd.c optional hptrr -dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:57:54 2019 (r351043) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:01 2019 (r351044) @@ -8,6 +8,11 @@ # any other architecture we support. # +# The long compile-with and dependency lines are required because of +# limitations in config: backslash-newline doesn't work in strings, and +# dependency lines other than the first are silently ignored. + +# cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" @@ -15,6 +20,36 @@ dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard +dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx +dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx +dev/hpt27xx/hpt27xx_config.c optional hpt27xx +hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/$M-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/$M-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule +dev/hptmv/entry.c optional hptmv +dev/hptmv/mv.c optional hptmv +dev/hptmv/gui_lib.c optional hptmv +dev/hptmv/hptproc.c optional hptmv +dev/hptmv/ioctl.c optional hptmv +hptmvraid.o optional hptmv \ + dependency "$S/dev/hptmv/$M-elf.raid.o.uu" \ + compile-with "uudecode < $S/dev/hptmv/$M-elf.raid.o.uu" \ + no-implicit-rule +dev/hptnr/hptnr_os_bsd.c optional hptnr +dev/hptnr/hptnr_osm_bsd.c optional hptnr +dev/hptnr/hptnr_config.c optional hptnr +hptnr_lib.o optional hptnr \ + dependency "$S/dev/hptnr/$M-elf.hptnr_lib.o.uu" \ + compile-with "uudecode < $S/dev/hptnr/$M-elf.hptnr_lib.o.uu" \ + no-implicit-rule +dev/hptrr/hptrr_os_bsd.c optional hptrr +dev/hptrr/hptrr_osm_bsd.c optional hptrr +dev/hptrr/hptrr_config.c optional hptrr +hptrr_lib.o optional hptrr \ + dependency "$S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ + compile-with "uudecode < $S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ + no-implicit-rule libkern/x86/crc32_sse42.c standard # # x86 shared code between IA32 and AMD64 architectures From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEBC0BAFEA; Wed, 14 Aug 2019 20:58:07 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46823g44d7z3xdr; Wed, 14 Aug 2019 20:58:07 +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 50C895D47; Wed, 14 Aug 2019 20:58:07 +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 x7EKw7Cm092155; Wed, 14 Aug 2019 20:58:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKw6b1092152; Wed, 14 Aug 2019 20:58:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKw6b1092152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351045 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:07 -0000 Author: imp Date: Wed Aug 14 20:58:06 2019 New Revision: 351045 URL: https://svnweb.freebsd.org/changeset/base/351045 Log: Apart from one MD file, aesni is common to x86. Move it into files.x86. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:01 2019 (r351044) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:06 2019 (r351045) @@ -145,35 +145,9 @@ cddl/contrib/opensolaris/common/atomic/amd64/opensolar cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/amd64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" crypto/aesni/aeskeys_amd64.S optional aesni -crypto/aesni/aesni.c optional aesni -aesni_ghash.o optional aesni \ - dependency "$S/crypto/aesni/aesni_ghash.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ - no-implicit-rule \ - clean "aesni_ghash.o" -aesni_ccm.o optional aesni \ - dependency "$S/crypto/aesni/aesni_ccm.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ - no-implicit-rule \ - clean "aesni_ccm.o" -aesni_wrap.o optional aesni \ - dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ - no-implicit-rule \ - clean "aesni_wrap.o" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | \ ipsec_support | netsmb -intel_sha1.o optional aesni \ - dependency "$S/crypto/aesni/intel_sha1.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ - no-implicit-rule \ - clean "intel_sha1.o" -intel_sha256.o optional aesni \ - dependency "$S/crypto/aesni/intel_sha256.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ - no-implicit-rule \ - clean "intel_sha256.o" crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:01 2019 (r351044) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:06 2019 (r351045) @@ -97,33 +97,7 @@ bf_enc.o optional crypto | ipsec | ipsec_support \ compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \ no-implicit-rule crypto/aesni/aeskeys_i386.S optional aesni -crypto/aesni/aesni.c optional aesni -aesni_ghash.o optional aesni \ - dependency "$S/crypto/aesni/aesni_ghash.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ - no-implicit-rule \ - clean "aesni_ghash.o" -aesni_ccm.o optional aesni \ - dependency "$S/crypto/aesni/aesni_ccm.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ - no-implicit-rule \ - clean "aesni_ccm.o" -aesni_wrap.o optional aesni \ - dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ - no-implicit-rule \ - clean "aesni_wrap.o" crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb -intel_sha1.o optional aesni \ - dependency "$S/crypto/aesni/intel_sha1.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ - no-implicit-rule \ - clean "intel_sha1.o" -intel_sha256.o optional aesni \ - dependency "$S/crypto/aesni/intel_sha256.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ - no-implicit-rule \ - clean "intel_sha256.o" crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:01 2019 (r351044) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:06 2019 (r351045) @@ -16,6 +16,40 @@ cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +# +cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +crypto/aesni/aesni.c optional aesni +aesni_ghash.o optional aesni \ + dependency "$S/crypto/aesni/aesni_ghash.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_ghash.o" +aesni_ccm.o optional aesni \ + dependency "$S/crypto/aesni/aesni_ccm.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_ccm.o" +aesni_wrap.o optional aesni \ + dependency "$S/crypto/aesni/aesni_wrap.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_wrap.o" +intel_sha1.o optional aesni \ + dependency "$S/crypto/aesni/intel_sha1.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ + no-implicit-rule \ + clean "intel_sha1.o" +intel_sha256.o optional aesni \ + dependency "$S/crypto/aesni/intel_sha256.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ + no-implicit-rule \ + clean "intel_sha256.o" +dev/fdc/fdc.c optional fdc +dev/fdc/fdc_acpi.c optional fdc +dev/fdc/fdc_isa.c optional fdc isa +dev/fdc/fdc_pccard.c optional fdc pccard dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:13 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FCACBB04C; Wed, 14 Aug 2019 20:58:13 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46823n05DSz3xlp; Wed, 14 Aug 2019 20:58:13 +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 D95105D48; Wed, 14 Aug 2019 20:58:12 +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 x7EKwCLW092211; Wed, 14 Aug 2019 20:58:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwCrf092208; Wed, 14 Aug 2019 20:58:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwCrf092208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351046 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:13 -0000 Author: imp Date: Wed Aug 14 20:58:12 2019 New Revision: 351046 URL: https://svnweb.freebsd.org/changeset/base/351046 Log: Move via padlock files to files.x86. VIA Padlock support is for VIA C3, C7 and Eden processors, which are 64bit x86 processors. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:06 2019 (r351045) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:12 2019 (r351046) @@ -148,9 +148,6 @@ crypto/aesni/aeskeys_amd64.S optional aesni crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | \ ipsec_support | netsmb -crypto/via/padlock.c optional padlock -crypto/via/padlock_cipher.c optional padlock -crypto/via/padlock_hash.c optional padlock dev/acpica/acpi_if.m standard dev/acpica/acpi_hpet.c optional acpi dev/acpica/acpi_pci.c optional acpi pci Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:06 2019 (r351045) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:12 2019 (r351046) @@ -98,9 +98,6 @@ bf_enc.o optional crypto | ipsec | ipsec_support \ no-implicit-rule crypto/aesni/aeskeys_i386.S optional aesni crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb -crypto/via/padlock.c optional padlock -crypto/via/padlock_cipher.c optional padlock -crypto/via/padlock_hash.c optional padlock dev/acpica/acpi_pci.c optional acpi pci dev/acpica/acpi_pci_link.c optional acpi pci dev/acpica/acpi_pcib.c optional acpi pci Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:06 2019 (r351045) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:12 2019 (r351046) @@ -46,6 +46,9 @@ intel_sha256.o optional aesni \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -msha ${.IMPSRC}" \ no-implicit-rule \ clean "intel_sha256.o" +crypto/via/padlock.c optional padlock +crypto/via/padlock_cipher.c optional padlock +crypto/via/padlock_hash.c optional padlock dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2694BB0BA; Wed, 14 Aug 2019 20:58:18 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46823t34thz3xv2; Wed, 14 Aug 2019 20:58:18 +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 4C4C95D4B; Wed, 14 Aug 2019 20:58:18 +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 x7EKwIJC092267; Wed, 14 Aug 2019 20:58:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwHCk092264; Wed, 14 Aug 2019 20:58:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwHCk092264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351047 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:18 -0000 Author: imp Date: Wed Aug 14 20:58:17 2019 New Revision: 351047 URL: https://svnweb.freebsd.org/changeset/base/351047 Log: The ACPI parts are identical between i386 and amd64 Apart from one MD file, ACPI is a x86 implementation, not specific to either i386 or amd64, so put it into files.x86. Other architectures include fewer files for the same options, so it can't move into the MI files file. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:12 2019 (r351046) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:17 2019 (r351047) @@ -148,15 +148,6 @@ crypto/aesni/aeskeys_amd64.S optional aesni crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | \ ipsec_support | netsmb -dev/acpica/acpi_if.m standard -dev/acpica/acpi_hpet.c optional acpi -dev/acpica/acpi_pci.c optional acpi pci -dev/acpica/acpi_pci_link.c optional acpi pci -dev/acpica/acpi_pcib.c optional acpi pci -dev/acpica/acpi_pcib_acpi.c optional acpi pci -dev/acpica/acpi_pcib_pci.c optional acpi pci -dev/acpica/acpi_pxm.c optional acpi -dev/acpica/acpi_timer.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp dev/agp/agp_i810.c optional agp Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:12 2019 (r351046) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:17 2019 (r351047) @@ -98,11 +98,6 @@ bf_enc.o optional crypto | ipsec | ipsec_support \ no-implicit-rule crypto/aesni/aeskeys_i386.S optional aesni crypto/des/arch/i386/des_enc.S optional crypto | ipsec | ipsec_support | netsmb -dev/acpica/acpi_pci.c optional acpi pci -dev/acpica/acpi_pci_link.c optional acpi pci -dev/acpica/acpi_pcib.c optional acpi pci -dev/acpica/acpi_pcib_acpi.c optional acpi pci -dev/acpica/acpi_pcib_pci.c optional acpi pci dev/agp/agp_ali.c optional agp dev/agp/agp_amd.c optional agp dev/agp/agp_amd64.c optional agp @@ -246,10 +241,6 @@ dev/vmware/vmci/vmci_kernel_if.c optional vmci dev/vmware/vmci/vmci_qpair.c optional vmci dev/vmware/vmci/vmci_queue_pair.c optional vmci dev/vmware/vmci/vmci_resource.c optional vmci -dev/acpica/acpi_if.m standard -dev/acpica/acpi_hpet.c optional acpi -dev/acpica/acpi_timer.c optional acpi -dev/acpica/acpi_pxm.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/wbwd/wbwd.c optional wbwd dev/isci/isci.c optional isci Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:12 2019 (r351046) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:17 2019 (r351047) @@ -49,6 +49,15 @@ intel_sha256.o optional aesni \ crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock +dev/acpica/acpi_hpet.c optional acpi +dev/acpica/acpi_if.m standard +dev/acpica/acpi_pci.c optional acpi pci +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci +dev/acpica/acpi_pcib_acpi.c optional acpi pci +dev/acpica/acpi_pcib_pci.c optional acpi pci +dev/acpica/acpi_pxm.c optional acpi +dev/acpica/acpi_timer.c optional acpi dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90462BB124; Wed, 14 Aug 2019 20:58:24 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4682401DJqz3y2Y; Wed, 14 Aug 2019 20:58:24 +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 D66485D51; Wed, 14 Aug 2019 20:58:23 +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 x7EKwNAT092323; Wed, 14 Aug 2019 20:58:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwNFJ092321; Wed, 14 Aug 2019 20:58:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwNFJ092321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351048 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:24 -0000 Author: imp Date: Wed Aug 14 20:58:23 2019 New Revision: 351048 URL: https://svnweb.freebsd.org/changeset/base/351048 Log: The bxe driver, QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver, is x86 specific, and only builds there. Likewise the module is built there. Move it to the x86-only files.x86. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:17 2019 (r351047) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:23 2019 (r351048) @@ -164,14 +164,6 @@ dev/atkbdc/atkbdc.c optional atkbdc dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc -dev/bxe/bxe.c optional bxe pci -dev/bxe/bxe_stats.c optional bxe pci -dev/bxe/bxe_debug.c optional bxe pci -dev/bxe/ecore_sp.c optional bxe pci -dev/bxe/bxe_elink.c optional bxe pci -dev/bxe/57710_init_values.c optional bxe pci -dev/bxe/57711_init_values.c optional bxe pci -dev/bxe/57712_init_values.c optional bxe pci dev/coretemp/coretemp.c optional coretemp dev/cpuctl/cpuctl.c optional cpuctl dev/dpms/dpms.c optional dpms Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:17 2019 (r351047) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:23 2019 (r351048) @@ -118,14 +118,6 @@ dev/atkbdc/atkbdc.c optional atkbdc dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc -dev/bxe/bxe.c optional bxe pci -dev/bxe/bxe_stats.c optional bxe pci -dev/bxe/bxe_debug.c optional bxe pci -dev/bxe/ecore_sp.c optional bxe pci -dev/bxe/bxe_elink.c optional bxe pci -dev/bxe/57710_init_values.c optional bxe pci -dev/bxe/57711_init_values.c optional bxe pci -dev/bxe/57712_init_values.c optional bxe pci dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce \ Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:17 2019 (r351047) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:23 2019 (r351048) @@ -58,6 +58,14 @@ dev/acpica/acpi_pcib_acpi.c optional acpi pci dev/acpica/acpi_pcib_pci.c optional acpi pci dev/acpica/acpi_pxm.c optional acpi dev/acpica/acpi_timer.c optional acpi +dev/bxe/bxe.c optional bxe pci +dev/bxe/bxe_stats.c optional bxe pci +dev/bxe/bxe_debug.c optional bxe pci +dev/bxe/ecore_sp.c optional bxe pci +dev/bxe/bxe_elink.c optional bxe pci +dev/bxe/57710_init_values.c optional bxe pci +dev/bxe/57711_init_values.c optional bxe pci +dev/bxe/57712_init_values.c optional bxe pci dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FA16BB17A; Wed, 14 Aug 2019 20:58:29 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4682450tXjz3y6g; Wed, 14 Aug 2019 20:58:29 +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 E99DC5D52; Wed, 14 Aug 2019 20:58:28 +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 x7EKwSJ1092378; Wed, 14 Aug 2019 20:58:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwSaq092375; Wed, 14 Aug 2019 20:58:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwSaq092375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351049 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:29 -0000 Author: imp Date: Wed Aug 14 20:58:28 2019 New Revision: 351049 URL: https://svnweb.freebsd.org/changeset/base/351049 Log: Move hyperv to files.x86 Move the comomon part of hyperv to files.x86. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:23 2019 (r351048) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:28 2019 (r351049) @@ -230,28 +230,6 @@ dev/hwpmc/hwpmc_core.c optional hwpmc dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/hyperv/input/hv_kbd.c optional hyperv -dev/hyperv/input/hv_kbdc.c optional hyperv -dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci -dev/hyperv/netvsc/hn_nvs.c optional hyperv -dev/hyperv/netvsc/hn_rndis.c optional hyperv -dev/hyperv/netvsc/if_hn.c optional hyperv -dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv -dev/hyperv/utilities/hv_kvp.c optional hyperv -dev/hyperv/utilities/hv_snapshot.c optional hyperv -dev/hyperv/utilities/vmbus_heartbeat.c optional hyperv -dev/hyperv/utilities/vmbus_ic.c optional hyperv -dev/hyperv/utilities/vmbus_shutdown.c optional hyperv -dev/hyperv/utilities/vmbus_timesync.c optional hyperv -dev/hyperv/vmbus/hyperv.c optional hyperv -dev/hyperv/vmbus/hyperv_busdma.c optional hyperv -dev/hyperv/vmbus/vmbus.c optional hyperv pci -dev/hyperv/vmbus/vmbus_br.c optional hyperv -dev/hyperv/vmbus/vmbus_chan.c optional hyperv -dev/hyperv/vmbus/vmbus_et.c optional hyperv -dev/hyperv/vmbus/vmbus_if.m optional hyperv -dev/hyperv/vmbus/vmbus_res.c optional hyperv -dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv dev/nctgpio/nctgpio.c optional nctgpio Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:23 2019 (r351048) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:28 2019 (r351049) @@ -148,26 +148,6 @@ dev/hwpmc/hwpmc_core.c optional hwpmc dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci -dev/hyperv/netvsc/hn_nvs.c optional hyperv -dev/hyperv/netvsc/hn_rndis.c optional hyperv -dev/hyperv/netvsc/if_hn.c optional hyperv -dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv -dev/hyperv/utilities/hv_kvp.c optional hyperv -dev/hyperv/utilities/hv_snapshot.c optional hyperv -dev/hyperv/utilities/vmbus_heartbeat.c optional hyperv -dev/hyperv/utilities/vmbus_ic.c optional hyperv -dev/hyperv/utilities/vmbus_shutdown.c optional hyperv -dev/hyperv/utilities/vmbus_timesync.c optional hyperv -dev/hyperv/vmbus/hyperv.c optional hyperv -dev/hyperv/vmbus/hyperv_busdma.c optional hyperv -dev/hyperv/vmbus/vmbus.c optional hyperv pci -dev/hyperv/vmbus/vmbus_br.c optional hyperv -dev/hyperv/vmbus/vmbus_chan.c optional hyperv -dev/hyperv/vmbus/vmbus_et.c optional hyperv -dev/hyperv/vmbus/vmbus_if.m optional hyperv -dev/hyperv/vmbus/vmbus_res.c optional hyperv -dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv dev/ichwd/ichwd.c optional ichwd Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:23 2019 (r351048) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:28 2019 (r351049) @@ -70,10 +70,6 @@ dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard -dev/fdc/fdc.c optional fdc -dev/fdc/fdc_acpi.c optional fdc -dev/fdc/fdc_isa.c optional fdc isa -dev/fdc/fdc_pccard.c optional fdc pccard dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_config.c optional hpt27xx @@ -104,6 +100,26 @@ hptrr_lib.o optional hptrr \ dependency "$S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ compile-with "uudecode < $S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ no-implicit-rule +dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci +dev/hyperv/netvsc/hn_nvs.c optional hyperv +dev/hyperv/netvsc/hn_rndis.c optional hyperv +dev/hyperv/netvsc/if_hn.c optional hyperv +dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_kvp.c optional hyperv +dev/hyperv/utilities/hv_snapshot.c optional hyperv +dev/hyperv/utilities/vmbus_heartbeat.c optional hyperv +dev/hyperv/utilities/vmbus_ic.c optional hyperv +dev/hyperv/utilities/vmbus_shutdown.c optional hyperv +dev/hyperv/utilities/vmbus_timesync.c optional hyperv +dev/hyperv/vmbus/hyperv.c optional hyperv +dev/hyperv/vmbus/hyperv_busdma.c optional hyperv +dev/hyperv/vmbus/vmbus.c optional hyperv pci +dev/hyperv/vmbus/vmbus_br.c optional hyperv +dev/hyperv/vmbus/vmbus_chan.c optional hyperv +dev/hyperv/vmbus/vmbus_et.c optional hyperv +dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv +dev/hyperv/vmbus/vmbus_xact.c optional hyperv libkern/x86/crc32_sse42.c standard # # x86 shared code between IA32 and AMD64 architectures From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A836BB230; Wed, 14 Aug 2019 20:58:35 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46824C0YkFz3yJP; Wed, 14 Aug 2019 20:58:35 +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 E4C295D53; Wed, 14 Aug 2019 20:58:34 +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 x7EKwYiA092436; Wed, 14 Aug 2019 20:58:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwYwG092434; Wed, 14 Aug 2019 20:58:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwYwG092434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351050 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:35 -0000 Author: imp Date: Wed Aug 14 20:58:34 2019 New Revision: 351050 URL: https://svnweb.freebsd.org/changeset/base/351050 Log: Intel's isci is part of the chipset, so it is x86 specific. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:28 2019 (r351049) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:34 2019 (r351050) @@ -393,115 +393,6 @@ dev/vmware/vmci/vmci_resource.c optional vmci dev/wbwd/wbwd.c optional wbwd dev/xen/pci/xen_acpi_pci.c optional xenhvm dev/xen/pci/xen_pci.c optional xenhvm -dev/isci/isci.c optional isci -dev/isci/isci_controller.c optional isci -dev/isci/isci_domain.c optional isci -dev/isci/isci_interrupt.c optional isci -dev/isci/isci_io_request.c optional isci -dev/isci/isci_logger.c optional isci -dev/isci/isci_oem_parameters.c optional isci -dev/isci/isci_remote_device.c optional isci -dev/isci/isci_sysctl.c optional isci -dev/isci/isci_task_request.c optional isci -dev/isci/isci_timer.c optional isci -dev/isci/scil/sati.c optional isci -dev/isci/scil/sati_abort_task_set.c optional isci -dev/isci/scil/sati_atapi.c optional isci -dev/isci/scil/sati_device.c optional isci -dev/isci/scil/sati_inquiry.c optional isci -dev/isci/scil/sati_log_sense.c optional isci -dev/isci/scil/sati_lun_reset.c optional isci -dev/isci/scil/sati_mode_pages.c optional isci -dev/isci/scil/sati_mode_select.c optional isci -dev/isci/scil/sati_mode_sense.c optional isci -dev/isci/scil/sati_mode_sense_10.c optional isci -dev/isci/scil/sati_mode_sense_6.c optional isci -dev/isci/scil/sati_move.c optional isci -dev/isci/scil/sati_passthrough.c optional isci -dev/isci/scil/sati_read.c optional isci -dev/isci/scil/sati_read_buffer.c optional isci -dev/isci/scil/sati_read_capacity.c optional isci -dev/isci/scil/sati_reassign_blocks.c optional isci -dev/isci/scil/sati_report_luns.c optional isci -dev/isci/scil/sati_request_sense.c optional isci -dev/isci/scil/sati_start_stop_unit.c optional isci -dev/isci/scil/sati_synchronize_cache.c optional isci -dev/isci/scil/sati_test_unit_ready.c optional isci -dev/isci/scil/sati_unmap.c optional isci -dev/isci/scil/sati_util.c optional isci -dev/isci/scil/sati_verify.c optional isci -dev/isci/scil/sati_write.c optional isci -dev/isci/scil/sati_write_and_verify.c optional isci -dev/isci/scil/sati_write_buffer.c optional isci -dev/isci/scil/sati_write_long.c optional isci -dev/isci/scil/sci_abstract_list.c optional isci -dev/isci/scil/sci_base_controller.c optional isci -dev/isci/scil/sci_base_domain.c optional isci -dev/isci/scil/sci_base_iterator.c optional isci -dev/isci/scil/sci_base_library.c optional isci -dev/isci/scil/sci_base_logger.c optional isci -dev/isci/scil/sci_base_memory_descriptor_list.c optional isci -dev/isci/scil/sci_base_memory_descriptor_list_decorator.c optional isci -dev/isci/scil/sci_base_object.c optional isci -dev/isci/scil/sci_base_observer.c optional isci -dev/isci/scil/sci_base_phy.c optional isci -dev/isci/scil/sci_base_port.c optional isci -dev/isci/scil/sci_base_remote_device.c optional isci -dev/isci/scil/sci_base_request.c optional isci -dev/isci/scil/sci_base_state_machine.c optional isci -dev/isci/scil/sci_base_state_machine_logger.c optional isci -dev/isci/scil/sci_base_state_machine_observer.c optional isci -dev/isci/scil/sci_base_subject.c optional isci -dev/isci/scil/sci_util.c optional isci -dev/isci/scil/scic_sds_controller.c optional isci -dev/isci/scil/scic_sds_library.c optional isci -dev/isci/scil/scic_sds_pci.c optional isci -dev/isci/scil/scic_sds_phy.c optional isci -dev/isci/scil/scic_sds_port.c optional isci -dev/isci/scil/scic_sds_port_configuration_agent.c optional isci -dev/isci/scil/scic_sds_remote_device.c optional isci -dev/isci/scil/scic_sds_remote_node_context.c optional isci -dev/isci/scil/scic_sds_remote_node_table.c optional isci -dev/isci/scil/scic_sds_request.c optional isci -dev/isci/scil/scic_sds_sgpio.c optional isci -dev/isci/scil/scic_sds_smp_remote_device.c optional isci -dev/isci/scil/scic_sds_smp_request.c optional isci -dev/isci/scil/scic_sds_ssp_request.c optional isci -dev/isci/scil/scic_sds_stp_packet_request.c optional isci -dev/isci/scil/scic_sds_stp_remote_device.c optional isci -dev/isci/scil/scic_sds_stp_request.c optional isci -dev/isci/scil/scic_sds_unsolicited_frame_control.c optional isci -dev/isci/scil/scif_sas_controller.c optional isci -dev/isci/scil/scif_sas_controller_state_handlers.c optional isci -dev/isci/scil/scif_sas_controller_states.c optional isci -dev/isci/scil/scif_sas_domain.c optional isci -dev/isci/scil/scif_sas_domain_state_handlers.c optional isci -dev/isci/scil/scif_sas_domain_states.c optional isci -dev/isci/scil/scif_sas_high_priority_request_queue.c optional isci -dev/isci/scil/scif_sas_internal_io_request.c optional isci -dev/isci/scil/scif_sas_io_request.c optional isci -dev/isci/scil/scif_sas_io_request_state_handlers.c optional isci -dev/isci/scil/scif_sas_io_request_states.c optional isci -dev/isci/scil/scif_sas_library.c optional isci -dev/isci/scil/scif_sas_remote_device.c optional isci -dev/isci/scil/scif_sas_remote_device_ready_substate_handlers.c optional isci -dev/isci/scil/scif_sas_remote_device_ready_substates.c optional isci -dev/isci/scil/scif_sas_remote_device_starting_substate_handlers.c optional isci -dev/isci/scil/scif_sas_remote_device_starting_substates.c optional isci -dev/isci/scil/scif_sas_remote_device_state_handlers.c optional isci -dev/isci/scil/scif_sas_remote_device_states.c optional isci -dev/isci/scil/scif_sas_request.c optional isci -dev/isci/scil/scif_sas_smp_activity_clear_affiliation.c optional isci -dev/isci/scil/scif_sas_smp_io_request.c optional isci -dev/isci/scil/scif_sas_smp_phy.c optional isci -dev/isci/scil/scif_sas_smp_remote_device.c optional isci -dev/isci/scil/scif_sas_stp_io_request.c optional isci -dev/isci/scil/scif_sas_stp_remote_device.c optional isci -dev/isci/scil/scif_sas_stp_task_request.c optional isci -dev/isci/scil/scif_sas_task_request.c optional isci -dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci -dev/isci/scil/scif_sas_task_request_states.c optional isci -dev/isci/scil/scif_sas_timer.c optional isci isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/kern_clocksource.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:28 2019 (r351049) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:34 2019 (r351050) @@ -215,115 +215,6 @@ dev/vmware/vmci/vmci_queue_pair.c optional vmci dev/vmware/vmci/vmci_resource.c optional vmci dev/acpi_support/acpi_wmi_if.m standard dev/wbwd/wbwd.c optional wbwd -dev/isci/isci.c optional isci -dev/isci/isci_controller.c optional isci -dev/isci/isci_domain.c optional isci -dev/isci/isci_interrupt.c optional isci -dev/isci/isci_io_request.c optional isci -dev/isci/isci_logger.c optional isci -dev/isci/isci_oem_parameters.c optional isci -dev/isci/isci_remote_device.c optional isci -dev/isci/isci_sysctl.c optional isci -dev/isci/isci_task_request.c optional isci -dev/isci/isci_timer.c optional isci -dev/isci/scil/sati.c optional isci -dev/isci/scil/sati_abort_task_set.c optional isci -dev/isci/scil/sati_atapi.c optional isci -dev/isci/scil/sati_device.c optional isci -dev/isci/scil/sati_inquiry.c optional isci -dev/isci/scil/sati_log_sense.c optional isci -dev/isci/scil/sati_lun_reset.c optional isci -dev/isci/scil/sati_mode_pages.c optional isci -dev/isci/scil/sati_mode_select.c optional isci -dev/isci/scil/sati_mode_sense.c optional isci -dev/isci/scil/sati_mode_sense_10.c optional isci -dev/isci/scil/sati_mode_sense_6.c optional isci -dev/isci/scil/sati_move.c optional isci -dev/isci/scil/sati_passthrough.c optional isci -dev/isci/scil/sati_read.c optional isci -dev/isci/scil/sati_read_buffer.c optional isci -dev/isci/scil/sati_read_capacity.c optional isci -dev/isci/scil/sati_reassign_blocks.c optional isci -dev/isci/scil/sati_report_luns.c optional isci -dev/isci/scil/sati_request_sense.c optional isci -dev/isci/scil/sati_start_stop_unit.c optional isci -dev/isci/scil/sati_synchronize_cache.c optional isci -dev/isci/scil/sati_test_unit_ready.c optional isci -dev/isci/scil/sati_unmap.c optional isci -dev/isci/scil/sati_util.c optional isci -dev/isci/scil/sati_verify.c optional isci -dev/isci/scil/sati_write.c optional isci -dev/isci/scil/sati_write_and_verify.c optional isci -dev/isci/scil/sati_write_buffer.c optional isci -dev/isci/scil/sati_write_long.c optional isci -dev/isci/scil/sci_abstract_list.c optional isci -dev/isci/scil/sci_base_controller.c optional isci -dev/isci/scil/sci_base_domain.c optional isci -dev/isci/scil/sci_base_iterator.c optional isci -dev/isci/scil/sci_base_library.c optional isci -dev/isci/scil/sci_base_logger.c optional isci -dev/isci/scil/sci_base_memory_descriptor_list.c optional isci -dev/isci/scil/sci_base_memory_descriptor_list_decorator.c optional isci -dev/isci/scil/sci_base_object.c optional isci -dev/isci/scil/sci_base_observer.c optional isci -dev/isci/scil/sci_base_phy.c optional isci -dev/isci/scil/sci_base_port.c optional isci -dev/isci/scil/sci_base_remote_device.c optional isci -dev/isci/scil/sci_base_request.c optional isci -dev/isci/scil/sci_base_state_machine.c optional isci -dev/isci/scil/sci_base_state_machine_logger.c optional isci -dev/isci/scil/sci_base_state_machine_observer.c optional isci -dev/isci/scil/sci_base_subject.c optional isci -dev/isci/scil/sci_util.c optional isci -dev/isci/scil/scic_sds_controller.c optional isci -dev/isci/scil/scic_sds_library.c optional isci -dev/isci/scil/scic_sds_pci.c optional isci -dev/isci/scil/scic_sds_phy.c optional isci -dev/isci/scil/scic_sds_port.c optional isci -dev/isci/scil/scic_sds_port_configuration_agent.c optional isci -dev/isci/scil/scic_sds_remote_device.c optional isci -dev/isci/scil/scic_sds_remote_node_context.c optional isci -dev/isci/scil/scic_sds_remote_node_table.c optional isci -dev/isci/scil/scic_sds_request.c optional isci -dev/isci/scil/scic_sds_sgpio.c optional isci -dev/isci/scil/scic_sds_smp_remote_device.c optional isci -dev/isci/scil/scic_sds_smp_request.c optional isci -dev/isci/scil/scic_sds_ssp_request.c optional isci -dev/isci/scil/scic_sds_stp_packet_request.c optional isci -dev/isci/scil/scic_sds_stp_remote_device.c optional isci -dev/isci/scil/scic_sds_stp_request.c optional isci -dev/isci/scil/scic_sds_unsolicited_frame_control.c optional isci -dev/isci/scil/scif_sas_controller.c optional isci -dev/isci/scil/scif_sas_controller_state_handlers.c optional isci -dev/isci/scil/scif_sas_controller_states.c optional isci -dev/isci/scil/scif_sas_domain.c optional isci -dev/isci/scil/scif_sas_domain_state_handlers.c optional isci -dev/isci/scil/scif_sas_domain_states.c optional isci -dev/isci/scil/scif_sas_high_priority_request_queue.c optional isci -dev/isci/scil/scif_sas_internal_io_request.c optional isci -dev/isci/scil/scif_sas_io_request.c optional isci -dev/isci/scil/scif_sas_io_request_state_handlers.c optional isci -dev/isci/scil/scif_sas_io_request_states.c optional isci -dev/isci/scil/scif_sas_library.c optional isci -dev/isci/scil/scif_sas_remote_device.c optional isci -dev/isci/scil/scif_sas_remote_device_ready_substate_handlers.c optional isci -dev/isci/scil/scif_sas_remote_device_ready_substates.c optional isci -dev/isci/scil/scif_sas_remote_device_starting_substate_handlers.c optional isci -dev/isci/scil/scif_sas_remote_device_starting_substates.c optional isci -dev/isci/scil/scif_sas_remote_device_state_handlers.c optional isci -dev/isci/scil/scif_sas_remote_device_states.c optional isci -dev/isci/scil/scif_sas_request.c optional isci -dev/isci/scil/scif_sas_smp_activity_clear_affiliation.c optional isci -dev/isci/scil/scif_sas_smp_io_request.c optional isci -dev/isci/scil/scif_sas_smp_phy.c optional isci -dev/isci/scil/scif_sas_smp_remote_device.c optional isci -dev/isci/scil/scif_sas_stp_io_request.c optional isci -dev/isci/scil/scif_sas_stp_remote_device.c optional isci -dev/isci/scil/scif_sas_stp_task_request.c optional isci -dev/isci/scil/scif_sas_task_request.c optional isci -dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci -dev/isci/scil/scif_sas_task_request_states.c optional isci -dev/isci/scil/scif_sas_timer.c optional isci i386/acpica/acpi_machdep.c optional acpi acpi_wakecode.o optional acpi \ dependency "$S/i386/acpica/acpi_wakecode.S assym.inc" \ Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:28 2019 (r351049) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:34 2019 (r351050) @@ -120,6 +120,115 @@ dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv +dev/isci/isci.c optional isci +dev/isci/isci_controller.c optional isci +dev/isci/isci_domain.c optional isci +dev/isci/isci_interrupt.c optional isci +dev/isci/isci_io_request.c optional isci +dev/isci/isci_logger.c optional isci +dev/isci/isci_oem_parameters.c optional isci +dev/isci/isci_remote_device.c optional isci +dev/isci/isci_sysctl.c optional isci +dev/isci/isci_task_request.c optional isci +dev/isci/isci_timer.c optional isci +dev/isci/scil/sati.c optional isci +dev/isci/scil/sati_abort_task_set.c optional isci +dev/isci/scil/sati_atapi.c optional isci +dev/isci/scil/sati_device.c optional isci +dev/isci/scil/sati_inquiry.c optional isci +dev/isci/scil/sati_log_sense.c optional isci +dev/isci/scil/sati_lun_reset.c optional isci +dev/isci/scil/sati_mode_pages.c optional isci +dev/isci/scil/sati_mode_select.c optional isci +dev/isci/scil/sati_mode_sense.c optional isci +dev/isci/scil/sati_mode_sense_10.c optional isci +dev/isci/scil/sati_mode_sense_6.c optional isci +dev/isci/scil/sati_move.c optional isci +dev/isci/scil/sati_passthrough.c optional isci +dev/isci/scil/sati_read.c optional isci +dev/isci/scil/sati_read_buffer.c optional isci +dev/isci/scil/sati_read_capacity.c optional isci +dev/isci/scil/sati_reassign_blocks.c optional isci +dev/isci/scil/sati_report_luns.c optional isci +dev/isci/scil/sati_request_sense.c optional isci +dev/isci/scil/sati_start_stop_unit.c optional isci +dev/isci/scil/sati_synchronize_cache.c optional isci +dev/isci/scil/sati_test_unit_ready.c optional isci +dev/isci/scil/sati_unmap.c optional isci +dev/isci/scil/sati_util.c optional isci +dev/isci/scil/sati_verify.c optional isci +dev/isci/scil/sati_write.c optional isci +dev/isci/scil/sati_write_and_verify.c optional isci +dev/isci/scil/sati_write_buffer.c optional isci +dev/isci/scil/sati_write_long.c optional isci +dev/isci/scil/sci_abstract_list.c optional isci +dev/isci/scil/sci_base_controller.c optional isci +dev/isci/scil/sci_base_domain.c optional isci +dev/isci/scil/sci_base_iterator.c optional isci +dev/isci/scil/sci_base_library.c optional isci +dev/isci/scil/sci_base_logger.c optional isci +dev/isci/scil/sci_base_memory_descriptor_list.c optional isci +dev/isci/scil/sci_base_memory_descriptor_list_decorator.c optional isci +dev/isci/scil/sci_base_object.c optional isci +dev/isci/scil/sci_base_observer.c optional isci +dev/isci/scil/sci_base_phy.c optional isci +dev/isci/scil/sci_base_port.c optional isci +dev/isci/scil/sci_base_remote_device.c optional isci +dev/isci/scil/sci_base_request.c optional isci +dev/isci/scil/sci_base_state_machine.c optional isci +dev/isci/scil/sci_base_state_machine_logger.c optional isci +dev/isci/scil/sci_base_state_machine_observer.c optional isci +dev/isci/scil/sci_base_subject.c optional isci +dev/isci/scil/sci_util.c optional isci +dev/isci/scil/scic_sds_controller.c optional isci +dev/isci/scil/scic_sds_library.c optional isci +dev/isci/scil/scic_sds_pci.c optional isci +dev/isci/scil/scic_sds_phy.c optional isci +dev/isci/scil/scic_sds_port.c optional isci +dev/isci/scil/scic_sds_port_configuration_agent.c optional isci +dev/isci/scil/scic_sds_remote_device.c optional isci +dev/isci/scil/scic_sds_remote_node_context.c optional isci +dev/isci/scil/scic_sds_remote_node_table.c optional isci +dev/isci/scil/scic_sds_request.c optional isci +dev/isci/scil/scic_sds_sgpio.c optional isci +dev/isci/scil/scic_sds_smp_remote_device.c optional isci +dev/isci/scil/scic_sds_smp_request.c optional isci +dev/isci/scil/scic_sds_ssp_request.c optional isci +dev/isci/scil/scic_sds_stp_packet_request.c optional isci +dev/isci/scil/scic_sds_stp_remote_device.c optional isci +dev/isci/scil/scic_sds_stp_request.c optional isci +dev/isci/scil/scic_sds_unsolicited_frame_control.c optional isci +dev/isci/scil/scif_sas_controller.c optional isci +dev/isci/scil/scif_sas_controller_state_handlers.c optional isci +dev/isci/scil/scif_sas_controller_states.c optional isci +dev/isci/scil/scif_sas_domain.c optional isci +dev/isci/scil/scif_sas_domain_state_handlers.c optional isci +dev/isci/scil/scif_sas_domain_states.c optional isci +dev/isci/scil/scif_sas_high_priority_request_queue.c optional isci +dev/isci/scil/scif_sas_internal_io_request.c optional isci +dev/isci/scil/scif_sas_io_request.c optional isci +dev/isci/scil/scif_sas_io_request_state_handlers.c optional isci +dev/isci/scil/scif_sas_io_request_states.c optional isci +dev/isci/scil/scif_sas_library.c optional isci +dev/isci/scil/scif_sas_remote_device.c optional isci +dev/isci/scil/scif_sas_remote_device_ready_substate_handlers.c optional isci +dev/isci/scil/scif_sas_remote_device_ready_substates.c optional isci +dev/isci/scil/scif_sas_remote_device_starting_substate_handlers.c optional isci +dev/isci/scil/scif_sas_remote_device_starting_substates.c optional isci +dev/isci/scil/scif_sas_remote_device_state_handlers.c optional isci +dev/isci/scil/scif_sas_remote_device_states.c optional isci +dev/isci/scil/scif_sas_request.c optional isci +dev/isci/scil/scif_sas_smp_activity_clear_affiliation.c optional isci +dev/isci/scil/scif_sas_smp_io_request.c optional isci +dev/isci/scil/scif_sas_smp_phy.c optional isci +dev/isci/scil/scif_sas_smp_remote_device.c optional isci +dev/isci/scil/scif_sas_stp_io_request.c optional isci +dev/isci/scil/scif_sas_stp_remote_device.c optional isci +dev/isci/scil/scif_sas_stp_task_request.c optional isci +dev/isci/scil/scif_sas_task_request.c optional isci +dev/isci/scil/scif_sas_task_request_state_handlers.c optional isci +dev/isci/scil/scif_sas_task_request_states.c optional isci +dev/isci/scil/scif_sas_timer.c optional isci libkern/x86/crc32_sse42.c standard # # x86 shared code between IA32 and AMD64 architectures From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B608ABB2AB; Wed, 14 Aug 2019 20:58:40 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46824J3sjyz3yQn; Wed, 14 Aug 2019 20:58:40 +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 3B3EB5D54; Wed, 14 Aug 2019 20:58:40 +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 x7EKwe2g092490; Wed, 14 Aug 2019 20:58:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwduj092486; Wed, 14 Aug 2019 20:58:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwduj092486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351051 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:40 -0000 Author: imp Date: Wed Aug 14 20:58:39 2019 New Revision: 351051 URL: https://svnweb.freebsd.org/changeset/base/351051 Log: Windows ndis support is x86 only. Move the MI parts there. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:34 2019 (r351050) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:39 2019 (r351051) @@ -444,16 +444,6 @@ compat/linux/linux_event.c optional compat_linux32 compat/linux/linux.c optional compat_linux32 dev/amr/amr_linux.c optional compat_linux32 amr dev/mfi/mfi_linux.c optional compat_linux32 mfi -# -# Windows NDIS driver support -# -compat/ndis/kern_ndis.c optional ndisapi pci -compat/ndis/kern_windrv.c optional ndisapi pci -compat/ndis/subr_hal.c optional ndisapi pci -compat/ndis/subr_ndis.c optional ndisapi pci -compat/ndis/subr_ntoskrnl.c optional ndisapi pci -compat/ndis/subr_pe.c optional ndisapi pci -compat/ndis/subr_usbd.c optional ndisapi pci compat/ndis/winx64_wrap.S optional ndisapi pci # # x86 real mode BIOS emulator, required by dpms/pci/vesa Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:34 2019 (r351050) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:39 2019 (r351051) @@ -84,13 +84,6 @@ compat/linux/linux_uid16.c optional compat_linux compat/linux/linux_util.c optional compat_linux compat/linux/linux_vdso.c optional compat_linux compat/linux/linux.c optional compat_linux -compat/ndis/kern_ndis.c optional ndisapi pci -compat/ndis/kern_windrv.c optional ndisapi pci -compat/ndis/subr_hal.c optional ndisapi pci -compat/ndis/subr_ndis.c optional ndisapi pci -compat/ndis/subr_ntoskrnl.c optional ndisapi pci -compat/ndis/subr_pe.c optional ndisapi pci -compat/ndis/subr_usbd.c optional ndisapi pci compat/ndis/winx32_wrap.S optional ndisapi pci bf_enc.o optional crypto | ipsec | ipsec_support \ dependency "$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \ Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:34 2019 (r351050) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:39 2019 (r351051) @@ -20,6 +20,13 @@ cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" cddl/dev/dtrace/x86/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +compat/ndis/kern_ndis.c optional ndisapi pci +compat/ndis/kern_windrv.c optional ndisapi pci +compat/ndis/subr_hal.c optional ndisapi pci +compat/ndis/subr_ndis.c optional ndisapi pci +compat/ndis/subr_ntoskrnl.c optional ndisapi pci +compat/ndis/subr_pe.c optional ndisapi pci +compat/ndis/subr_usbd.c optional ndisapi pci crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ dependency "$S/crypto/aesni/aesni_ghash.c" \ From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C94EBB344; Wed, 14 Aug 2019 20:58:46 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46824Q0Vhkz3yZ0; Wed, 14 Aug 2019 20:58:46 +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 E59475D55; Wed, 14 Aug 2019 20:58:45 +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 x7EKwjDj092548; Wed, 14 Aug 2019 20:58:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwjec092543; Wed, 14 Aug 2019 20:58:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwjec092543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351052 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:46 -0000 Author: imp Date: Wed Aug 14 20:58:44 2019 New Revision: 351052 URL: https://svnweb.freebsd.org/changeset/base/351052 Log: The x86 part of hwpmc is shared, so move it to files.x86. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:39 2019 (r351051) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:44 2019 (r351052) @@ -224,12 +224,6 @@ dev/ixl/i40e_dcb.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/gpio/bytgpio.c optional bytgpio dev/gpio/chvgpio.c optional chvgpio -dev/hwpmc/hwpmc_amd.c optional hwpmc -dev/hwpmc/hwpmc_intel.c optional hwpmc -dev/hwpmc/hwpmc_core.c optional hwpmc -dev/hwpmc/hwpmc_uncore.c optional hwpmc -dev/hwpmc/hwpmc_tsc.c optional hwpmc -dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv dev/nctgpio/nctgpio.c optional nctgpio Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:39 2019 (r351051) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:44 2019 (r351052) @@ -135,12 +135,6 @@ dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb dev/gpio/bytgpio.c optional bytgpio dev/gpio/chvgpio.c optional chvgpio -dev/hwpmc/hwpmc_amd.c optional hwpmc -dev/hwpmc/hwpmc_intel.c optional hwpmc -dev/hwpmc/hwpmc_core.c optional hwpmc -dev/hwpmc/hwpmc_uncore.c optional hwpmc -dev/hwpmc/hwpmc_tsc.c optional hwpmc -dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv dev/ichwd/ichwd.c optional ichwd Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:39 2019 (r351051) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:44 2019 (r351052) @@ -107,6 +107,12 @@ hptrr_lib.o optional hptrr \ dependency "$S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ compile-with "uudecode < $S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ no-implicit-rule +dev/hwpmc/hwpmc_amd.c optional hwpmc +dev/hwpmc/hwpmc_intel.c optional hwpmc +dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc +dev/hwpmc/hwpmc_tsc.c optional hwpmc +dev/hwpmc/hwpmc_x86.c optional hwpmc dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv From owner-svn-src-head@freebsd.org Wed Aug 14 20:58:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99687BB3E9; Wed, 14 Aug 2019 20:58:51 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46824W1bdwz3ygM; Wed, 14 Aug 2019 20:58:51 +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 012775D56; Wed, 14 Aug 2019 20:58:51 +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 x7EKwoG4092601; Wed, 14 Aug 2019 20:58:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EKwokG092598; Wed, 14 Aug 2019 20:58:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908142058.x7EKwokG092598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Aug 2019 20:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351053 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 351053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 20:58:51 -0000 Author: imp Date: Wed Aug 14 20:58:50 2019 New Revision: 351053 URL: https://svnweb.freebsd.org/changeset/base/351053 Log: Move the common x86 ipmi files to files.x86. The powerpc file list is different enough that unification will have to wait for the next pass. Reviewed by: jhb (verbal OK on irc) Differential Revision: https://reviews.freebsd.org/D21248 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.x86 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Aug 14 20:58:44 2019 (r351052) +++ head/sys/conf/files.amd64 Wed Aug 14 20:58:50 2019 (r351053) @@ -182,16 +182,6 @@ dev/intel/spi.c optional intelspi dev/io/iodev.c optional io dev/ioat/ioat.c optional ioat pci dev/ioat/ioat_test.c optional ioat pci -dev/ipmi/ipmi.c optional ipmi -dev/ipmi/ipmi_acpi.c optional ipmi acpi -dev/ipmi/ipmi_isa.c optional ipmi isa -dev/ipmi/ipmi_kcs.c optional ipmi -dev/ipmi/ipmi_smic.c optional ipmi -dev/ipmi/ipmi_smbus.c optional ipmi smbus -dev/ipmi/ipmi_smbios.c optional ipmi -dev/ipmi/ipmi_ssif.c optional ipmi smbus -dev/ipmi/ipmi_pci.c optional ipmi pci -dev/ipmi/ipmi_linux.c optional ipmi compat_linux32 dev/ixl/if_ixl.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixl_pf_main.c optional ixl pci \ Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Aug 14 20:58:44 2019 (r351052) +++ head/sys/conf/files.i386 Wed Aug 14 20:58:50 2019 (r351053) @@ -146,16 +146,6 @@ dev/imcsmb/imcsmb.c optional imcsmb dev/imcsmb/imcsmb_pci.c optional imcsmb pci dev/intel/spi.c optional intelspi dev/io/iodev.c optional io -dev/ipmi/ipmi.c optional ipmi -dev/ipmi/ipmi_acpi.c optional ipmi acpi -dev/ipmi/ipmi_isa.c optional ipmi isa -dev/ipmi/ipmi_kcs.c optional ipmi -dev/ipmi/ipmi_smic.c optional ipmi -dev/ipmi/ipmi_smbus.c optional ipmi smbus -dev/ipmi/ipmi_smbios.c optional ipmi -dev/ipmi/ipmi_ssif.c optional ipmi smbus -dev/ipmi/ipmi_pci.c optional ipmi pci -dev/ipmi/ipmi_linux.c optional ipmi compat_linux dev/le/if_le_isa.c optional le isa dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci Modified: head/sys/conf/files.x86 ============================================================================== --- head/sys/conf/files.x86 Wed Aug 14 20:58:44 2019 (r351052) +++ head/sys/conf/files.x86 Wed Aug 14 20:58:50 2019 (r351053) @@ -133,6 +133,16 @@ dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv +dev/ipmi/ipmi.c optional ipmi +dev/ipmi/ipmi_acpi.c optional ipmi acpi +dev/ipmi/ipmi_isa.c optional ipmi isa +dev/ipmi/ipmi_kcs.c optional ipmi +dev/ipmi/ipmi_smic.c optional ipmi +dev/ipmi/ipmi_smbus.c optional ipmi smbus +dev/ipmi/ipmi_smbios.c optional ipmi +dev/ipmi/ipmi_ssif.c optional ipmi smbus +dev/ipmi/ipmi_pci.c optional ipmi pci +dev/ipmi/ipmi_linux.c optional ipmi compat_linux32 dev/isci/isci.c optional isci dev/isci/isci_controller.c optional isci dev/isci/isci_domain.c optional isci From owner-svn-src-head@freebsd.org Wed Aug 14 21:15:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00CAFBBEAB; Wed, 14 Aug 2019 21:15:28 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (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 4682Rg4bgcz419p; Wed, 14 Aug 2019 21:15:27 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 4682Rb6kVWz3l3S; Wed, 14 Aug 2019 21:15:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id WLGIJeuoBVgl; Wed, 14 Aug 2019 21:15:23 +0000 (UTC) Received: from garnet.daemonic.se (unknown [IPv6:2001:470:dca9:201:99b8:b5f9:82da:aca0]) by mail.daemonic.se (Postfix) with ESMTPSA id 4682Rb1pmLz3c7W; Wed, 14 Aug 2019 21:15:23 +0000 (UTC) Subject: Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux To: Cy Schubert , Hans Petter Selasky Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201908140936.x7E9aQAc069612@repo.freebsd.org> <201908141900.x7EJ0RxC058082@slippy.cwsent.com> <48113a1f-d19b-0d18-937c-fd302ac2650e@freebsd.org> <70C15A2D-4D6F-424F-8993-606C3FC04B51@cschubert.com> From: Niclas Zeising Message-ID: <611436c4-7466-d0fc-5ee2-8e27bda64d56@freebsd.org> Date: Wed, 14 Aug 2019 23:15:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <70C15A2D-4D6F-424F-8993-606C3FC04B51@cschubert.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4682Rg4bgcz419p X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:36236, ipnet:2607:f740:d::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 21:15:28 -0000 On 2019-08-14 21:24, Cy Schubert wrote: > On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky wrote: >> On 2019-08-14 21:00, Cy Schubert wrote: >>> John's patch to drm-current-kmod (ports r508877) works! This broke >>> drm-current-kmod. >> >> You need to update the port. This patch should have been tested too. >> >> Did you try that first? >> >> --HPS > > The port is up to date. Sorry for not attaching output. I was in a rush to get back to $JOB. I'll rerun it tonight. > > Ports should be updated with a fix now, sorry about that. Regards -- Niclas Zeising From owner-svn-src-head@freebsd.org Wed Aug 14 21:16:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD75FBBF4B; Wed, 14 Aug 2019 21:16:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4682Sq3w7jz41Jj; Wed, 14 Aug 2019 21:16:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id y0d4h54jGUIS2y0d5hERyJ; Wed, 14 Aug 2019 15:16:24 -0600 X-Authority-Analysis: v=2.3 cv=N41X6F1B c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=FmdZ9Uzk2mMA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=U74ffv0h1H2-L8LvWZIA:9 a=QEXdDO2ut3YA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from 5CG5030TVK-N.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 3B2ECC5F; Wed, 14 Aug 2019 14:16:22 -0700 (PDT) Date: Wed, 14 Aug 2019 14:16:02 -0700 In-Reply-To: <70C15A2D-4D6F-424F-8993-606C3FC04B51@cschubert.com> References: <201908140936.x7E9aQAc069612@repo.freebsd.org> <201908141900.x7EJ0RxC058082@slippy.cwsent.com> <48113a1f-d19b-0d18-937c-fd302ac2650e@freebsd.org> <70C15A2D-4D6F-424F-8993-606C3FC04B51@cschubert.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfE0HlMUQazMpTCBu13yh85AaVpJFmazLt0MFbOGbsEgvO/vJUnnzaLFmwKa5ZvrlWKHt4ZIrrVC9t2BhWZCbodwqNJT29njQSTx3A+dccLiJUeahILVy s0Rx7OYUXMgTaVkB/Rzq8ROXQoJJfyznMcGJeovhbbpBsLP3x7caiKqQUN8W07RlAfSiWiJ24BwloJaZ/r4cdmRokAle/XL8TxIBfv4hqfen/E2WNP4/aZBA xgOhYpSeIcbm/6PTeRrEGyGY7DQ8fr0b82RlSh965A0jcFaj7rCvg259+wRCO13x X-Rspamd-Queue-Id: 4682Sq3w7jz41Jj X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.12) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-5.51 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.47)[ip: (-6.61), ipnet: 64.59.128.0/20(-3.17), asn: 6327(-2.46), country: CA(-0.09)]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; RCVD_IN_DNSWL_NONE(0.00)[12.134.59.64.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[233.154.66.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11, 17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 21:16:28 -0000 On August 14, 2019 12:24:19 PM PDT, Cy Schubert wrote: >On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky > wrote: >>On 2019-08-14 21:00, Cy Schubert wrote: >>> John's patch to drm-current-kmod (ports r508877) works! This broke >>> drm-current-kmod=2E >> >>You need to update the port=2E This patch should have been tested too=2E >> >>Did you try that first? >> >>--HPS > >The port is up to date=2E Sorry for not attaching output=2E I was in a ru= sh >to get back to $JOB=2E I'll rerun it tonight=2E I see a ports commit that looks like it will fix this=2E I'll give it a sp= in when I get home tonight=2E=20 --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-head@freebsd.org Wed Aug 14 21:18:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA7E3BC0CB; Wed, 14 Aug 2019 21:18:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4682WG3YM7z41Z1; Wed, 14 Aug 2019 21:18:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id y0f9h56RcUIS2y0fAhESSS; Wed, 14 Aug 2019 15:18:33 -0600 X-Authority-Analysis: v=2.3 cv=N41X6F1B c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=FmdZ9Uzk2mMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=Be7SB-20SHJpZFh3AG4A:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from 5CG5030TVK-N.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id CBF14C79; Wed, 14 Aug 2019 14:18:30 -0700 (PDT) Date: Wed, 14 Aug 2019 14:18:11 -0700 In-Reply-To: <611436c4-7466-d0fc-5ee2-8e27bda64d56@freebsd.org> References: <201908140936.x7E9aQAc069612@repo.freebsd.org> <201908141900.x7EJ0RxC058082@slippy.cwsent.com> <48113a1f-d19b-0d18-937c-fd302ac2650e@freebsd.org> <70C15A2D-4D6F-424F-8993-606C3FC04B51@cschubert.com> <611436c4-7466-d0fc-5ee2-8e27bda64d56@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r351009 - head/sys/compat/linuxkpi/common/include/linux To: Niclas Zeising , Hans Petter Selasky CC: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Cy Schubert Message-ID: <5C4ECEBD-7C71-45A6-B661-7DF1B155F404@cschubert.com> X-CMAE-Envelope: MS4wfN+svmFVIFqNBM9NddhCv+/5xYTVQ2yPDDPZNKdykOv/wu4g5J8KetSJ5+nvENEiY0sM1dCKKhhqaJy4BFvyVytU4OKFmvvWTRitsVNZA6VTxeEfmlUx TApJHuZ088D56NYcx9EUzlp7skXXg8HLwL7yWmRx/+33ECpqYUs3HgvZ2odQJ2JTJj73Nb74m08CmkS917i9Y4hSxSsC+MkcugyxElLrIFLoBjbp+70nc7gQ LAjXcOKtRE0HYH2xsoD1p02thMvPJWld3SR43lCA6wTxqZx4a0mNPbkoMGwVDmenNQWxqrPvb72Ow4QyxSpEmkmNOqLLx6JfqplY8jRjhA8= X-Rspamd-Queue-Id: 4682WG3YM7z41Z1 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.13) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-5.52 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.49)[ip: (-6.72), ipnet: 64.59.128.0/20(-3.17), asn: 6327(-2.46), country: CA(-0.09)]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; RCVD_IN_DNSWL_NONE(0.00)[13.134.59.64.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11, 233.154.66.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 21:18:35 -0000 On August 14, 2019 2:15:22 PM PDT, Niclas Zeising w= rote: >On 2019-08-14 21:24, Cy Schubert wrote: >> On August 14, 2019 12:06:24 PM PDT, Hans Petter Selasky > wrote: >>> On 2019-08-14 21:00, Cy Schubert wrote: >>>> John's patch to drm-current-kmod (ports r508877) works! This broke >>>> drm-current-kmod=2E >>> >>> You need to update the port=2E This patch should have been tested too= =2E >>> >>> Did you try that first? >>> >>> --HPS >>=20 >> The port is up to date=2E Sorry for not attaching output=2E I was in a >rush to get back to $JOB=2E I'll rerun it tonight=2E >>=20 >>=20 > >Ports should be updated with a fix now, sorry about that=2E >Regards NP=2E I just noticed the commit email=2E I'll give it a spin when I get ho= me=2E Thanks for all your work maintaining drm for us=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-head@freebsd.org Wed Aug 14 22:13:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F353BD543; Wed, 14 Aug 2019 22:13:12 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4683kJ2VCWz44F2; Wed, 14 Aug 2019 22:13:12 +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 1DC3C6BBE; Wed, 14 Aug 2019 22:13:12 +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 x7EMDCMx040503; Wed, 14 Aug 2019 22:13:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EMDB8m040500; Wed, 14 Aug 2019 22:13:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201908142213.x7EMDB8m040500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 14 Aug 2019 22:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351054 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 351054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 22:13:12 -0000 Author: jhb Date: Wed Aug 14 22:13:11 2019 New Revision: 351054 URL: https://svnweb.freebsd.org/changeset/base/351054 Log: Stop listing "on motherboard" as the parent of nexus devices on x86. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D21256 Modified: head/sys/x86/x86/io_apic.c head/sys/x86/x86/legacy.c head/sys/x86/x86/nexus.c Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Wed Aug 14 20:58:50 2019 (r351053) +++ head/sys/x86/x86/io_apic.c Wed Aug 14 22:13:11 2019 (r351054) @@ -924,7 +924,7 @@ ioapic_register(void *cookie) flags = ioapic_read(apic, IOAPIC_VER) & IOART_VER_VERSION; STAILQ_INSERT_TAIL(&ioapic_list, io, io_next); mtx_unlock_spin(&icu_lock); - printf("ioapic%u irqs %u-%u on motherboard\n", + printf("ioapic%u irqs %u-%u\n", io->io_id, flags >> 4, flags & 0xf, io->io_intbase, io->io_intbase + io->io_numintr - 1); Modified: head/sys/x86/x86/legacy.c ============================================================================== --- head/sys/x86/x86/legacy.c Wed Aug 14 20:58:50 2019 (r351053) +++ head/sys/x86/x86/legacy.c Wed Aug 14 22:13:11 2019 (r351054) @@ -169,8 +169,7 @@ legacy_attach(device_t dev) bus_generic_attach(dev); /* - * If we didn't see ISA on a pci bridge, create some - * connection points now so they show up "on motherboard". + * If we didn't see ISA on a PCI bridge, add a top-level bus. */ if (!devclass_get_device(devclass_find("isa"), 0)) { child = BUS_ADD_CHILD(dev, 0, "isa", 0); @@ -191,7 +190,7 @@ legacy_print_child(device_t bus, device_t child) retval += bus_print_child_header(bus, child); if (atdev->lg_pcibus != -1) retval += printf(" pcibus %d", atdev->lg_pcibus); - retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ + retval += printf("\n"); return (retval); } Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Wed Aug 14 20:58:50 2019 (r351053) +++ head/sys/x86/x86/nexus.c Wed Aug 14 22:13:11 2019 (r351054) @@ -322,7 +322,7 @@ nexus_print_child(device_t bus, device_t child) retval += nexus_print_all_resources(child); if (device_get_flags(child)) retval += printf(" flags %#x", device_get_flags(child)); - retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ + retval += printf("\n"); return (retval); } From owner-svn-src-head@freebsd.org Wed Aug 14 22:33:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C8CEBDA5E; Wed, 14 Aug 2019 22:33:47 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4684B26WWBz455s; Wed, 14 Aug 2019 22:33:46 +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 C17DE6F46; Wed, 14 Aug 2019 22:33:46 +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 x7EMXkZl052289; Wed, 14 Aug 2019 22:33:46 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EMXkS6052288; Wed, 14 Aug 2019 22:33:46 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201908142233.x7EMXkS6052288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 14 Aug 2019 22:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351055 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 351055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 22:33:47 -0000 Author: sjg Date: Wed Aug 14 22:33:46 2019 New Revision: 351055 URL: https://svnweb.freebsd.org/changeset/base/351055 Log: bsd.files.mk: fix targets to avoid directories Reintroduce :T when file is used as part of a target name. Reviewed by: stevek Modified: head/share/mk/bsd.files.mk Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Wed Aug 14 22:13:11 2019 (r351054) +++ head/share/mk/bsd.files.mk Wed Aug 14 22:33:46 2019 (r351055) @@ -101,11 +101,11 @@ STAGE_AS_SETS+= ${file} STAGE_AS_${file}= ${${group}NAME_${file}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}} -stage_as.${file}: ${file} +stage_as.${file:T}: ${file} installfiles-${group}: _${group}INS1_${file} -_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} -_${group}INS_${file}: ${file} +_${group}INS1_${file:T}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} +_${group}INS_${file:T}: ${file} ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \ -g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \ ${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}} From owner-svn-src-head@freebsd.org Wed Aug 14 22:35:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F432BDB53; Wed, 14 Aug 2019 22:35:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4684Cg6tL7z45KD; Wed, 14 Aug 2019 22:35:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3B4B6F4E; Wed, 14 Aug 2019 22:35:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7EMZBW8052561; Wed, 14 Aug 2019 22:35:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7EMZBYA052559; Wed, 14 Aug 2019 22:35:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908142235.x7EMZBYA052559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Aug 2019 22:35:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351056 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 351056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 14 Aug 2019 22:35:12 -0000 Author: mav Date: Wed Aug 14 22:35:11 2019 New Revision: 351056 URL: https://svnweb.freebsd.org/changeset/base/351056 Log: Add support for PCI Device ID 0x148B in ntb_hw_amd driver. Submitted by: Rajesh Kumar MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20892 Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Wed Aug 14 22:33:46 2019 (r351055) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Wed Aug 14 22:35:11 2019 (r351056) @@ -80,8 +80,35 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_AMD_NTB, "amd_ntb_hw", "amd_ntb_hw driver memory allocations"); -struct pci_device_table amd_ntb_devs[] = { - { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID), +static const struct amd_ntb_hw_info amd_ntb_hw_info_list[] = { + + { .vendor_id = NTB_HW_AMD_VENDOR_ID, + .device_id = NTB_HW_AMD_DEVICE_ID1, + .mw_count = 3, + .bar_start_idx = 1, + .spad_count = 16, + .db_count = 16, + .msix_vector_count = 24, + .quirks = QUIRK_MW0_32BIT, + .desc = "AMD Non-Transparent Bridge"}, + + { .vendor_id = NTB_HW_AMD_VENDOR_ID, + .device_id = NTB_HW_AMD_DEVICE_ID2, + .mw_count = 2, + .bar_start_idx = 2, + .spad_count = 16, + .db_count = 16, + .msix_vector_count = 24, + .quirks = 0, + .desc = "AMD Non-Transparent Bridge"}, +}; + +static const struct pci_device_table amd_ntb_devs[] = { + { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID1), + .driver_data = (uintptr_t)&amd_ntb_hw_info_list[0], + PCI_DESCR("AMD Non-Transparent Bridge") }, + { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID2), + .driver_data = (uintptr_t)&amd_ntb_hw_info_list[1], PCI_DESCR("AMD Non-Transparent Bridge") } }; @@ -299,7 +326,7 @@ amd_ntb_mw_count(device_t dev) { struct amd_ntb_softc *ntb = device_get_softc(dev); - return (ntb->mw_count); + return (ntb->hw_info->mw_count); } static int @@ -310,10 +337,10 @@ amd_ntb_mw_get_range(device_t dev, unsigned mw_idx, vm struct amd_ntb_softc *ntb = device_get_softc(dev); struct amd_ntb_pci_bar_info *bar_info; - if (mw_idx < 0 || mw_idx >= ntb->mw_count) + if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count) return (EINVAL); - bar_info = &ntb->bar_info[mw_idx+1]; + bar_info = &ntb->bar_info[ntb->hw_info->bar_start_idx + mw_idx]; if (base != NULL) *base = bar_info->pbase; @@ -331,10 +358,15 @@ amd_ntb_mw_get_range(device_t dev, unsigned mw_idx, vm *align_size = 1; if (plimit != NULL) { - if (mw_idx != 0) - *plimit = BUS_SPACE_MAXADDR; - else + /* + * For Device ID 0x145B (which has 3 memory windows), + * memory window 0 use a 32-bit bar. The remaining + * cases all use 64-bit bar. + */ + if ((mw_idx == 0) && (ntb->hw_info->quirks & QUIRK_MW0_32BIT)) *plimit = BUS_SPACE_MAXADDR_32BIT; + else + *plimit = BUS_SPACE_MAXADDR; } return (0); @@ -346,12 +378,12 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu struct amd_ntb_softc *ntb = device_get_softc(dev); struct amd_ntb_pci_bar_info *bar_info; - if (mw_idx < 0 || mw_idx >= ntb->mw_count) + if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count) return (EINVAL); - bar_info = &ntb->bar_info[mw_idx+1]; + bar_info = &ntb->bar_info[ntb->hw_info->bar_start_idx + mw_idx]; - /* make sure the range fits in the usable mw size */ + /* Make sure the range fits in the usable mw size. */ if (size > bar_info->size) { amd_ntb_printf(0, "%s: size 0x%x greater than mw_size 0x%x\n", __func__, (uint32_t)size, (uint32_t)bar_info->size); @@ -364,26 +396,34 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu /* * AMD NTB XLAT and Limit registers needs to be written only after - * link enable + * link enable. * - * set and verify setting the translation address + * Set and verify setting the translation address register. */ amd_ntb_peer_reg_write(8, bar_info->xlat_off, (uint64_t)addr); amd_ntb_printf(0, "%s: mw %d xlat_off 0x%x cur_val 0x%jx addr %p\n", __func__, mw_idx, bar_info->xlat_off, amd_ntb_peer_reg_read(8, bar_info->xlat_off), (void *)addr); - /* set and verify setting the limit */ - if (mw_idx != 0) { - amd_ntb_reg_write(8, bar_info->limit_off, (uint64_t)size); - amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%jx limit 0x%x\n", - __func__, bar_info->limit_off, - amd_ntb_peer_reg_read(8, bar_info->limit_off), (uint32_t)size); - } else { + /* + * Set and verify setting the limit register. + * + * For Device ID 0x145B (which has 3 memory windows), + * memory window 0 use a 32-bit bar. The remaining + * cases all use 64-bit bar. + */ + if ((mw_idx == 0) && (ntb->hw_info->quirks & QUIRK_MW0_32BIT)) { amd_ntb_reg_write(4, bar_info->limit_off, (uint64_t)size); amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%x limit 0x%x\n", __func__, bar_info->limit_off, - amd_ntb_peer_reg_read(4, bar_info->limit_off), (uint32_t)size); + amd_ntb_peer_reg_read(4, bar_info->limit_off), + (uint32_t)size); + } else { + amd_ntb_reg_write(8, bar_info->limit_off, (uint64_t)size); + amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%lx limit 0x%x\n", + __func__, bar_info->limit_off, + amd_ntb_peer_reg_read(8, bar_info->limit_off), + (uint32_t)size); } return (0); @@ -396,7 +436,7 @@ amd_ntb_mw_clear_trans(device_t dev, unsigned mw_idx) amd_ntb_printf(1, "%s: mw_idx %d\n", __func__, mw_idx); - if (mw_idx < 0 || mw_idx >= ntb->mw_count) + if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count) return (EINVAL); return (amd_ntb_mw_set_trans(dev, mw_idx, 0, 0)); @@ -409,10 +449,10 @@ amd_ntb_mw_set_wc(device_t dev, unsigned int mw_idx, v struct amd_ntb_pci_bar_info *bar_info; int rc; - if (mw_idx < 0 || mw_idx >= ntb->mw_count) + if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count) return (EINVAL); - bar_info = &ntb->bar_info[mw_idx+1]; + bar_info = &ntb->bar_info[ntb->hw_info->bar_start_idx + mw_idx]; if (mode == bar_info->map_mode) return (0); @@ -431,10 +471,10 @@ amd_ntb_mw_get_wc(device_t dev, unsigned mw_idx, vm_me amd_ntb_printf(1, "%s: mw_idx %d\n", __func__, mw_idx); - if (mw_idx < 0 || mw_idx >= ntb->mw_count) + if (mw_idx < 0 || mw_idx >= ntb->hw_info->mw_count) return (EINVAL); - bar_info = &ntb->bar_info[mw_idx+1]; + bar_info = &ntb->bar_info[ntb->hw_info->bar_start_idx + mw_idx]; *mode = bar_info->map_mode; return (0); @@ -448,9 +488,10 @@ amd_ntb_db_vector_count(device_t dev) { struct amd_ntb_softc *ntb = device_get_softc(dev); - amd_ntb_printf(1, "%s: db_count 0x%x\n", __func__, ntb->db_count); + amd_ntb_printf(1, "%s: db_count 0x%x\n", __func__, + ntb->hw_info->db_count); - return (ntb->db_count); + return (ntb->hw_info->db_count); } static uint64_t @@ -470,9 +511,9 @@ amd_ntb_db_vector_mask(device_t dev, uint32_t vector) struct amd_ntb_softc *ntb = device_get_softc(dev); amd_ntb_printf(1, "%s: vector %d db_count 0x%x db_valid_mask 0x%x\n", - __func__, vector, ntb->db_count, ntb->db_valid_mask); + __func__, vector, ntb->hw_info->db_count, ntb->db_valid_mask); - if (vector < 0 || vector >= ntb->db_count) + if (vector < 0 || vector >= ntb->hw_info->db_count) return (0); return (ntb->db_valid_mask & (1 << vector)); @@ -545,7 +586,8 @@ amd_ntb_spad_count(device_t dev) { struct amd_ntb_softc *ntb = device_get_softc(dev); - amd_ntb_printf(1, "%s: spad_count 0x%x\n", __func__, ntb->spad_count); + amd_ntb_printf(1, "%s: spad_count 0x%x\n", __func__, + ntb->spad_count); return (ntb->spad_count); } @@ -662,11 +704,11 @@ amd_ntb_hw_info_handler(SYSCTL_HANDLER_ARGS) } sbuf_printf(sb, "AMD Memory window count: %d\n", - ntb->mw_count); + ntb->hw_info->mw_count); sbuf_printf(sb, "AMD Spad count: %d\n", ntb->spad_count); sbuf_printf(sb, "AMD Doorbell count: %d\n", - ntb->db_count); + ntb->hw_info->db_count); sbuf_printf(sb, "AMD MSI-X vec count: %d\n\n", ntb->msix_vec_count); sbuf_printf(sb, "AMD Doorbell valid mask: 0x%x\n", @@ -757,7 +799,7 @@ amd_link_hb(void *arg) static void amd_ntb_interrupt(struct amd_ntb_softc *ntb, uint16_t vec) { - if (vec < AMD_DB_CNT) + if (vec < ntb->hw_info->db_count) ntb_db_event(ntb->device, vec); else amd_ntb_printf(0, "Invalid vector %d\n", vec); @@ -891,7 +933,7 @@ amd_ntb_init_isr(struct amd_ntb_softc *ntb) ntb->db_mask = ntb->db_valid_mask; - rc = amd_ntb_create_msix_vec(ntb, AMD_MSIX_VECTOR_CNT); + rc = amd_ntb_create_msix_vec(ntb, ntb->hw_info->msix_vector_count); if (rc != 0) { amd_ntb_printf(0, "Error creating msix vectors: %d\n", rc); return (ENOMEM); @@ -899,13 +941,13 @@ amd_ntb_init_isr(struct amd_ntb_softc *ntb) /* * Check the number of MSI-X message supported by the device. - * Minimum necessary MSI-X message count should be equal to db_count + * Minimum necessary MSI-X message count should be equal to db_count. */ supported_vectors = pci_msix_count(ntb->device); - num_vectors = MIN(supported_vectors, ntb->db_count); - if (num_vectors < ntb->db_count) { + num_vectors = MIN(supported_vectors, ntb->hw_info->db_count); + if (num_vectors < ntb->hw_info->db_count) { amd_ntb_printf(0, "No minimum msix: supported %d db %d\n", - supported_vectors, ntb->db_count); + supported_vectors, ntb->hw_info->db_count); msi = true; goto err_msix_enable; } @@ -918,12 +960,12 @@ amd_ntb_init_isr(struct amd_ntb_softc *ntb) goto err_msix_enable; } - if (num_vectors < ntb->db_count) { + if (num_vectors < ntb->hw_info->db_count) { amd_ntb_printf(0, "Allocated only %d MSI-X\n", num_vectors); msi = true; /* - * Else set ntb->db_count = ntb->msix_vec_count = num_vectors, - * msi=false and dont release msi + * Else set ntb->hw_info->db_count = ntb->msix_vec_count = + * num_vectors, msi=false and dont release msi. */ } @@ -942,16 +984,16 @@ err_msix_enable: } } - ntb->db_count = ntb->msix_vec_count = num_vectors; + ntb->hw_info->db_count = ntb->msix_vec_count = num_vectors; if (intx) { num_vectors = 1; - ntb->db_count = 1; + ntb->hw_info->db_count = 1; ntb->msix_vec_count = 0; } amd_ntb_printf(0, "%s: db %d msix %d msi %d intx %d\n", - __func__, ntb->db_count, ntb->msix_vec_count, (int)msi, (int)intx); + __func__, ntb->hw_info->db_count, ntb->msix_vec_count, (int)msi, (int)intx); rc = amd_ntb_setup_isr(ntb, num_vectors, msi, intx); if (rc != 0) { @@ -1002,10 +1044,7 @@ amd_ntb_get_topo(struct amd_ntb_softc *ntb) static int amd_ntb_init_dev(struct amd_ntb_softc *ntb) { - ntb->mw_count = AMD_MW_CNT; - ntb->spad_count = AMD_SPADS_CNT; - ntb->db_count = AMD_DB_CNT; - ntb->db_valid_mask = (1ull << ntb->db_count) - 1; + ntb->db_valid_mask = (1ull << ntb->hw_info->db_count) - 1; mtx_init(&ntb->db_mask_lock, "amd ntb db bits", NULL, MTX_SPIN); switch (ntb->conn_type) { @@ -1105,7 +1144,7 @@ amd_ntb_map_pci_bars(struct amd_ntb_softc *ntb) if (rc != 0) goto out; - /* Memory Window 0 BAR - BAR 1*/ + /* Memory Window 0 BAR - BAR 1 */ ntb->bar_info[NTB_BAR_1].pci_resource_id = PCIR_BAR(1); rc = map_bar(ntb, &ntb->bar_info[NTB_BAR_1]); if (rc != 0) @@ -1153,12 +1192,15 @@ amd_ntb_unmap_pci_bars(struct amd_ntb_softc *ntb) static int amd_ntb_probe(device_t device) { + struct amd_ntb_softc *ntb = device_get_softc(device); const struct pci_device_table *tbl; tbl = PCI_MATCH(device, amd_ntb_devs); if (tbl == NULL) return (ENXIO); + ntb->hw_info = (struct amd_ntb_hw_info *)tbl->driver_data; + ntb->spad_count = ntb->hw_info->spad_count; device_set_desc(device, tbl->descr); return (BUS_PROBE_GENERIC); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Wed Aug 14 22:33:46 2019 (r351055) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Wed Aug 14 22:35:11 2019 (r351056) @@ -48,7 +48,8 @@ #define NTB_HW_AMD_H #define NTB_HW_AMD_VENDOR_ID 0x1022 -#define NTB_HW_AMD_DEVICE_ID 0x145B +#define NTB_HW_AMD_DEVICE_ID1 0x145B +#define NTB_HW_AMD_DEVICE_ID2 0x148B #define NTB_DEF_PEER_CNT 1 #define NTB_DEF_PEER_IDX 0 @@ -82,6 +83,8 @@ #define DB_MASK_UNLOCK(sc) mtx_unlock_spin(&(sc)->db_mask_lock) #define DB_MASK_ASSERT(sc, f) mtx_assert(&(sc)->db_mask_lock, (f)) +#define QUIRK_MW0_32BIT 0x01 + /* amd_ntb_conn_type are hardware numbers, cannot change. */ enum amd_ntb_conn_type { NTB_CONN_NONE = -1, @@ -103,8 +106,15 @@ enum amd_ntb_bar { }; struct amd_ntb_hw_info { - uint32_t device_id; - const char *desc; + uint16_t vendor_id; + uint16_t device_id; + uint8_t mw_count; + uint8_t bar_start_idx; + uint8_t spad_count; + uint8_t db_count; + uint8_t msix_vector_count; + uint8_t quirks; + char *desc; }; struct amd_ntb_pci_bar_info { @@ -135,12 +145,6 @@ struct amd_ntb_vec { }; enum { - /* AMD NTB Capability */ - AMD_MW_CNT = 3, - AMD_DB_CNT = 16, - AMD_MSIX_VECTOR_CNT = 24, - AMD_SPADS_CNT = 16, - /* AMD NTB Link Status Offset */ AMD_LINK_STATUS_OFFSET = 0x68, @@ -226,15 +230,14 @@ struct amd_ntb_softc { enum amd_ntb_conn_type conn_type; struct amd_ntb_pci_bar_info bar_info[NTB_MAX_BARS]; - struct amd_ntb_int_info int_info[AMD_MSIX_VECTOR_CNT]; + struct amd_ntb_int_info int_info[16]; struct amd_ntb_vec *msix_vec; uint16_t allocated_interrupts; struct callout hb_timer; - uint8_t mw_count; + struct amd_ntb_hw_info *hw_info; uint8_t spad_count; - uint8_t db_count; uint8_t msix_vec_count; struct mtx db_mask_lock; From owner-svn-src-head@freebsd.org Thu Aug 15 00:23:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E30F9C0AB0; Thu, 15 Aug 2019 00:23:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4686c75h6Nz4C9L; Thu, 15 Aug 2019 00:23:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4E698326; Thu, 15 Aug 2019 00:23:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7F0N36d017198; Thu, 15 Aug 2019 00:23:03 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F0N3Nm017197; Thu, 15 Aug 2019 00:23:03 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908150023.x7F0N3Nm017197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 00:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351061 - head/tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/fusefs X-SVN-Commit-Revision: 351061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 00:23:03 -0000 Author: asomers Date: Thu Aug 15 00:23:03 2019 New Revision: 351061 URL: https://svnweb.freebsd.org/changeset/base/351061 Log: fusefs: fix the 32-bit build after 351042 Reported by: jhb MFC after: 2 weeks MFC-With: 351042 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/fs/fusefs/mockfs.cc Modified: head/tests/sys/fs/fusefs/mockfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.cc Wed Aug 14 23:31:53 2019 (r351060) +++ head/tests/sys/fs/fusefs/mockfs.cc Thu Aug 15 00:23:03 2019 (r351061) @@ -842,7 +842,8 @@ void MockFS::read_request(mockfs_buf_in &in) { * request,including header, even though fuse_out_header.len excludes * the size of the header. */ - ASSERT_TRUE(res == in.header.len || m_quit); + ASSERT_TRUE(res == static_cast(sizeof(in.header.len)) || + m_quit); } void MockFS::write_response(const mockfs_buf_out &out) { From owner-svn-src-head@freebsd.org Thu Aug 15 00:39:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0ADE4C0F79; Thu, 15 Aug 2019 00:39:54 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4686zY5s3jz4Cds; Thu, 15 Aug 2019 00:39:53 +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 AA73284E8; Thu, 15 Aug 2019 00:39:53 +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 x7F0drTq023673; Thu, 15 Aug 2019 00:39:53 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F0drQa023672; Thu, 15 Aug 2019 00:39:53 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908150039.x7F0drQa023672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 15 Aug 2019 00:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351062 - head/sys/dev/random X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/random X-SVN-Commit-Revision: 351062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 00:39:54 -0000 Author: cem Date: Thu Aug 15 00:39:53 2019 New Revision: 351062 URL: https://svnweb.freebsd.org/changeset/base/351062 Log: random(4): Remove "EXPERIMENTAL" verbiage from concurrent operation No functional change. Add a verbose comment giving an example side-by-side comparison between the prior and Concurrent modes of Fortuna, and why one should believe they produce the same result. The intent is to flip this on by default prior to 13.0, so testing is encouraged. To enable, add the following to loader.conf: kern.random.fortuna.concurrent_read="1" The intent is also to flip the default blockcipher to the faster Chacha-20 prior to 13.0, so testing of that mode of operation is also appreciated. To enable, add the following to loader.conf: kern.random.use_chacha20_cipher="1" Approved by: secteam(implicit) Modified: head/sys/dev/random/fortuna.c Modified: head/sys/dev/random/fortuna.c ============================================================================== --- head/sys/dev/random/fortuna.c Thu Aug 15 00:23:03 2019 (r351061) +++ head/sys/dev/random/fortuna.c Thu Aug 15 00:39:53 2019 (r351062) @@ -125,8 +125,8 @@ static struct fortuna_state { } fortuna_state; /* - * Experimental concurrent reads feature. For now, disabled by default. But - * we may enable it in the future. + * This knob enables or disables Concurrent Reads. The plan is to turn it on + * by default sometime before 13.0 branches. * * The benefit is improved concurrency in Fortuna. That is reflected in two * related aspects: @@ -141,6 +141,107 @@ static struct fortuna_state { * global state mutex, potentially blocking on a reader. Our adaptive * mutexes assume that a lock holder currently on CPU will release the lock * quickly, and spin if the owning thread is currently running. + * + * The concern is that the reduced lock scope might results in a less safe + * random(4) design. However, the reduced-lock scope design is still + * fundamentally Fortuna. This is discussed below. + * + * Fortuna Read() only needs mutual exclusion between readers to correctly + * update the shared read-side state: just C, the 128-bit counter, and K, the + * current cipher key. + * + * In the Fortuna design, the global counter C should provide an independent + * range of values per generator (CTR-mode cipher or similar) invocation. + * + * Under lock, we can save a copy of C on the stack, and increment the global C + * by the number of blocks a Read request will require. + * + * Still under lock, we can save a copy of the key K on the stack, and then + * perform the usual key erasure K' <- Keystream(C, K, ...). This does require + * generating 256 bits (32 bytes) of cryptographic keystream output with the + * global lock held, but that's all; none of the user keystream generation must + * be performed under lock. + * + * At this point, we may unlock. + * + * Some example timelines below (to oversimplify, all requests are in units of + * native blocks, and the keysize happens to be equal or less to the native + * blocksize of the underlying cipher, and the same sequence of two requests + * arrive in the same order). The possibly expensive consumer keystream + * generation portion is marked with '**'. + * + * Status Quo fortuna_read() Reduced-scope locking + * ------------------------- --------------------- + * C=C_0, K=K_0 C=C_0, K=K_0 + * + * 1:Lock() 1:Lock() + * + * 1:GenBytes() 1:stack_C := C_0 + * 1: Keystream(C_0, K_0, N) 1:stack_K := K_0 + * 1: ** 1:C' := C_0 + N + * 1: C' := C_0 + N 1:K' := Keystream(C', K_0, 1) + * 1: <- Keystream 1: <1 block generated> + * 1: K' := Keystream(C', K_0, 1) 1: C'' := C' + 1 + * 1: <1 block generated> 1: <- Keystream + * 1: C'' := C' + 1 1:Unlock() + * 1: <- Keystream + * 1: <- GenBytes() + * 1:Unlock() + * + * Just prior to unlock, shared state is identical: + * ------------------------------------------------ + * C'' == C_0 + N + 1 C'' == C_0 + N + 1 + * K' == keystream generated from K' == keystream generated from + * C_0 + N, K_0. C_0 + N, K_0. + * K_0 has been erased. K_0 has been erased. + * + * After both designs unlock, the 2nd reader is unblocked. + * + * 2:Lock() 2:Lock() + * 2:GenBytes() 2:stack_C' := C'' + * 2: Keystream(C'', K', M) 2:stack_K' := K' + * 2: ** 2:C''' := C'' + M + * 2: C''' := C'' + M 2:K'' := Keystream(C''', K', 1) + * 2: <- Keystream 2: <1 block generated> + * 2: K'' := Keystream(C''', K', 1) 2: C'''' := C''' + 1 + * 2: <1 block generated> 2: <- Keystream + * 2: C'''' := C''' + 1 2:Unlock() + * 2: <- Keystream + * 2: <- GenBytes() + * 2:Unlock() + * + * Just prior to unlock, shared state is still identical: + * ------------------------------------------------------ + * + * C'''' == (C_0 + N + 1) + M + 1 C'''' == (C_0 + N + 1) + M + 1 + * K'' == keystream generated from K'' == keystream generated from + * C_0 + N + 1 + M, K'. C_0 + N + 1 + M, K'. + * K' has been erased. K' has been erased. + * + * Finally, in the new design, the two consumer threads can finish the + * remainder of the generation at any time (including simultaneously): + * + * 1: GenBytes() + * 1: Keystream(stack_C, stack_K, N) + * 1: ** + * 1: <- Keystream + * 1: <- GenBytes + * 1:ExplicitBzero(stack_C, stack_K) + * + * 2: GenBytes() + * 2: Keystream(stack_C', stack_K', M) + * 2: ** + * 2: <- Keystream + * 2: <- GenBytes + * 2:ExplicitBzero(stack_C', stack_K') + * + * The generated user keystream for both threads is identical between the two + * implementations: + * + * 1: Keystream(C_0, K_0, N) 1: Keystream(stack_C, stack_K, N) + * 2: Keystream(C'', K', M) 2: Keystream(stack_C', stack_K', M) + * + * (stack_C == C_0; stack_K == K_0; stack_C' == C''; stack_K' == K'.) */ static bool fortuna_concurrent_read __read_frequently = false; @@ -203,7 +304,7 @@ random_fortuna_init_alg(void *unused __unused) SYSCTL_ADD_BOOL(&random_clist, SYSCTL_CHILDREN(random_fortuna_o), OID_AUTO, "concurrent_read", CTLFLAG_RDTUN, - &fortuna_concurrent_read, 0, "If non-zero, enable EXPERIMENTAL " + &fortuna_concurrent_read, 0, "If non-zero, enable " "feature to improve concurrent Fortuna performance."); #endif @@ -606,13 +707,8 @@ random_fortuna_read_concurrent(uint8_t *buf, size_t by RANDOM_RESEED_LOCK(); KASSERT(!uint128_is_zero(fortuna_state.fs_counter), ("FS&K: C != 0")); + /* - * Technically, we only need mutual exclusion to update shared state - * appropriately. Nothing about updating the shared internal state - * requires that we perform (most) expensive cryptographic keystream - * generation under lock. (We still need to generate 256 bits of - * keystream to re-key between consumers.) - * * Save the original counter and key values that will be used as the * PRF for this particular consumer. */ From owner-svn-src-head@freebsd.org Thu Aug 15 02:14:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE805C3B78; Thu, 15 Aug 2019 02:14:44 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4689504qRyz4Hhr; Thu, 15 Aug 2019 02:14:44 +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 82F699719; Thu, 15 Aug 2019 02:14:44 +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 x7F2Ei6g081543; Thu, 15 Aug 2019 02:14:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F2EiNx081542; Thu, 15 Aug 2019 02:14:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908150214.x7F2EiNx081542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 02:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351063 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 351063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 02:14:44 -0000 Author: emaste Date: Thu Aug 15 02:14:44 2019 New Revision: 351063 URL: https://svnweb.freebsd.org/changeset/base/351063 Log: arch.7: be explicit about the future for unmigrated GCC 4.2.1 archs Reported by: imp MFC after: 1 week MFC with: r351036 Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Thu Aug 15 00:39:53 2019 (r351062) +++ head/share/man/man7/arch.7 Thu Aug 15 02:14:44 2019 (r351063) @@ -336,8 +336,9 @@ This table shows the default tool chain for each archi (1) External toolchain provided by ports/packages. .Pp Note that GCC 4.2.1 is deprecated, and scheduled for removal on 2020-03-31. -CPU architectures not migrated to either base system Clang or external -toolchain by then will be desupported. +Any CPU architectures not migrated by then +(to either base system Clang or external toolchain) +may be removed from the tree after that date. .Ss Predefined Macros The compiler provides a number of predefined macros. Some of these provide architecture-specific details and are explained below. From owner-svn-src-head@freebsd.org Thu Aug 15 02:30:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67004C40C1; Thu, 15 Aug 2019 02:30:45 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4689RT29Scz4JPG; Thu, 15 Aug 2019 02:30:45 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C5099915; Thu, 15 Aug 2019 02:30:45 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7F2Ujg6088928; Thu, 15 Aug 2019 02:30:45 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F2Ui4Y088925; Thu, 15 Aug 2019 02:30:44 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201908150230.x7F2Ui4Y088925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 15 Aug 2019 02:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351064 - in head: sbin/swapon share/man/man5 sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: in head: sbin/swapon share/man/man5 sys/vm X-SVN-Commit-Revision: 351064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 02:30:45 -0000 Author: dougm Date: Thu Aug 15 02:30:44 2019 New Revision: 351064 URL: https://svnweb.freebsd.org/changeset/base/351064 Log: swap_pager.c reserves 2 blocks for a bsd label. Change that 2 to the expression howmany(BBSIZE, PAGE_SIZE), where BBSIZE is the size of the boot block area. That can be less than 2 if PAGE_SIZE is big. swapon(8) has an option to trim (delete) all the blocks of a device at startup. However, if the first of those blocks is a bsd label, then trimming those blocks is destructive. Change swapon to leave the first BBSIZE bytes untrimmed. Update manual pages to reflect changes in how swapon and how it may be used, espeically in association with savecore. Reviewed by: alc Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21191 Modified: head/sbin/swapon/swapon.8 head/sbin/swapon/swapon.c head/share/man/man5/fstab.5 head/sys/vm/swap_pager.c Modified: head/sbin/swapon/swapon.8 ============================================================================== --- head/sbin/swapon/swapon.8 Thu Aug 15 02:14:44 2019 (r351063) +++ head/sbin/swapon/swapon.8 Thu Aug 15 02:30:44 2019 (r351064) @@ -90,7 +90,17 @@ The .Fl E option causes each of following devices to receive a .Dv BIO_DELETE -command to mark all blocks as unused. +command. +This command marks the device's blocks as unused, except those that +might store a disk label. +This marking can erase a crash dump. +To delay +.Nm swapon +for a device until after +.Nm savecore +has copied the crash dump to another location, use the +.Dq late +option. .Pp The .Nm swapoff Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Thu Aug 15 02:14:44 2019 (r351063) +++ head/sbin/swapon/swapon.c Thu Aug 15 02:30:44 2019 (r351064) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -761,8 +762,8 @@ swapon_trim(const char *name) } else errx(1, "%s has an invalid file type", name); /* Trim the device. */ - ioarg[0] = 0; - ioarg[1] = sz; + ioarg[0] = BBSIZE; + ioarg[1] = sz - BBSIZE; if (ioctl(fd, DIOCGDELETE, ioarg) != 0) warn("ioctl(DIOCGDELETE)"); Modified: head/share/man/man5/fstab.5 ============================================================================== --- head/share/man/man5/fstab.5 Thu Aug 15 02:14:44 2019 (r351063) +++ head/share/man/man5/fstab.5 Thu Aug 15 02:30:44 2019 (r351064) @@ -246,8 +246,17 @@ For swap devices, the keyword .Dq trimonce triggers the delivery of a .Dv BIO_DELETE -command to the device to mark -all blocks as unused. +command to the device. +This command marks the device's blocks as unused, except those that +might store a disk label. +This marking can erase a crash dump. +To delay +.Nm swapon +for a device until after +.Nm savecore +has copied the crash dump to another location, use the +.Dq late +option. For vnode-backed swap spaces, .Dq file is supported in the Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Aug 15 02:14:44 2019 (r351063) +++ head/sys/vm/swap_pager.c Thu Aug 15 02:30:44 2019 (r351064) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2298,10 +2299,11 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl sp->sw_blist = blist_create(nblks, M_WAITOK); /* - * Do not free the first two block in order to avoid overwriting + * Do not free the first blocks in order to avoid overwriting * any bsd label at the front of the partition */ - blist_free(sp->sw_blist, 2, nblks - 2); + blist_free(sp->sw_blist, howmany(BBSIZE, PAGE_SIZE), + nblks - howmany(BBSIZE, PAGE_SIZE)); dvbase = 0; mtx_lock(&sw_dev_mtx); @@ -2319,7 +2321,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl sp->sw_end = dvbase + nblks; TAILQ_INSERT_TAIL(&swtailq, sp, sw_list); nswapdev++; - swap_pager_avail += nblks - 2; + swap_pager_avail += nblks - howmany(BBSIZE, PAGE_SIZE); swap_total += nblks; swapon_check_swzone(); swp_sizecheck(); From owner-svn-src-head@freebsd.org Thu Aug 15 03:42:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDD58C59D2; Thu, 15 Aug 2019 03:42:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468C204Klvz4MNP; Thu, 15 Aug 2019 03:42:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 767EBA80E; Thu, 15 Aug 2019 03:42:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7F3gGlc033723; Thu, 15 Aug 2019 03:42:16 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F3gGOG033449; Thu, 15 Aug 2019 03:42:16 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201908150342.x7F3gGOG033449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 15 Aug 2019 03:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351065 - in head/sys/powerpc: booke include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: booke include X-SVN-Commit-Revision: 351065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 03:42:16 -0000 Author: jhibbits Date: Thu Aug 15 03:42:15 2019 New Revision: 351065 URL: https://svnweb.freebsd.org/changeset/base/351065 Log: powerpc/pmap: Enable UMA_MD_SMALL_ALLOC for 64-bit booke The only thing blocking UMA_MD_SMALL_ALLOC from working on 64-bit booke powerpc was a missing check in pmap_kextract(). Adding DMAP handling into pmap_kextract(), we can now use UMA_MD_SMALL_ALLOC. This should improve performance and stability a bit, since DMAP is always mapped in TLB1, so this relieves pressure on TLB0. MFC after: 3 weeks Modified: head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu Aug 15 02:30:44 2019 (r351064) +++ head/sys/powerpc/booke/pmap.c Thu Aug 15 03:42:15 2019 (r351065) @@ -1958,6 +1958,11 @@ mmu_booke_kextract(mmu_t mmu, vm_offset_t va) vm_paddr_t p = 0; int i; +#ifdef __powerpc64__ + if (va >= DMAP_BASE_ADDRESS && va <= DMAP_MAX_ADDRESS) + return (DMAP_TO_PHYS(va)); +#endif + if (va >= VM_MIN_KERNEL_ADDRESS && va <= VM_MAX_KERNEL_ADDRESS) p = pte_vatopa(mmu, kernel_pmap, va); Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Thu Aug 15 02:30:44 2019 (r351064) +++ head/sys/powerpc/include/vmparam.h Thu Aug 15 03:42:15 2019 (r351065) @@ -133,6 +133,11 @@ #else /* Book-E */ +/* Use the direct map for UMA small allocs on powerpc64. */ +#ifdef __powerpc64__ +#define UMA_MD_SMALL_ALLOC +#endif + #define KERNBASE 0x04000100 /* start of kernel physical */ #ifndef __powerpc64__ #define VM_MIN_KERNEL_ADDRESS 0xc0000000 From owner-svn-src-head@freebsd.org Thu Aug 15 04:47:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B99C2C6C8A; Thu, 15 Aug 2019 04:47:42 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468DTV4VP4z4Psc; Thu, 15 Aug 2019 04:47:42 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D359B341; Thu, 15 Aug 2019 04:47:42 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7F4lgEk071135; Thu, 15 Aug 2019 04:47:42 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F4lg6W071134; Thu, 15 Aug 2019 04:47:42 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908150447.x7F4lg6W071134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 04:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351066 - head/tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/fusefs X-SVN-Commit-Revision: 351066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 04:47:42 -0000 Author: asomers Date: Thu Aug 15 04:47:42 2019 New Revision: 351066 URL: https://svnweb.freebsd.org/changeset/base/351066 Log: fusefs: fix conditional from r351061 The entirety of r351061 was a copy/paste error. I'm sorry I've been comitting so hastily. Reported by: rpokala Reviewed by: rpokala MFC after: 2 weeks MFC-With: 351061 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21265 Modified: head/tests/sys/fs/fusefs/mockfs.cc Modified: head/tests/sys/fs/fusefs/mockfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.cc Thu Aug 15 03:42:15 2019 (r351065) +++ head/tests/sys/fs/fusefs/mockfs.cc Thu Aug 15 04:47:42 2019 (r351066) @@ -842,8 +842,7 @@ void MockFS::read_request(mockfs_buf_in &in) { * request,including header, even though fuse_out_header.len excludes * the size of the header. */ - ASSERT_TRUE(res == static_cast(sizeof(in.header.len)) || - m_quit); + ASSERT_TRUE(res == static_cast(in.header.len) || m_quit); } void MockFS::write_response(const mockfs_buf_out &out) { From owner-svn-src-head@freebsd.org Thu Aug 15 05:05:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38784C748B; Thu, 15 Aug 2019 05:05:04 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468DsV6C95z4Qkl; Thu, 15 Aug 2019 05:05:02 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1565845492; bh=y1EWcgQd3QRopiDivI5OcPB4s7ZkXOKjIVlkuglrYPM=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=Kuar956l+wepnNgXO2Iy6uRDCERJ/gn0vciprKkElO9RtdxRcM9Qa/9NaI8gqFjxs U5c/hQ0a+eSkS0QQ4G4tVe9MDCSfA8rgfnxuEW0KOBhk7KydDDd1NYBNGTwUHEJssz bkKTPGAKCRrTsVHxuPqOJ4c9iyk0o/ZE6LAD/yzQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from freyja ([46.88.81.15]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M7sHy-1huI6f3Q7G-0052Lt; Thu, 15 Aug 2019 06:59:19 +0200 Date: Thu, 15 Aug 2019 06:59:12 +0200 From: "O. Hartmann" To: "Simon J. Gerraty" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351055 - head/share/mk Message-ID: <20190815065907.6537c2d1@freyja> In-Reply-To: <201908142233.x7EMXkS6052288@repo.freebsd.org> References: <201908142233.x7EMXkS6052288@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:3mvMuzMHIw0ouenIiwKPgidIEdk2uDI8/Xs7cQwmsv9LoxTp0Ag a/piBaCe7WJ38jVfZi9GcPDsnMJ8nXKtIe252Mpil2N9nt3VlxBqs0rg6w3Sea51cZ7Y1JQ HkCt0v2BJHLVcKU1oxovJyYOewKm4z/8cduilQqlyX4uHkkqGPfDuxbosR2J+ngYMSO+Y6W hzD0tAhNO5B9Qcjr5NYSw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:M5bQpF/XWcw=:mT3qx3L5Jb777OiAADVc9f Wc4LVm4f78y8hR52rt9erd3Nb9wGh3yw6gIi4Cr6lkrkUrUUe8/L9W/94AH4xqgLGY62JL1OG 1ekQa3o8lRqhalv4d7brI3Jm9/aFVwrIfBcmYqJdHClLbatphQGdQDlI5lAIroq/ZwPznkQBn VdAuy+fHgIl2iLCF2yZ58LKM9SyWw2hiRoDidzDQ00doHKu69miOLIbOdCQKoEP5LRxGYrpz9 PR4WnDxPhmuBAgeegsJxAish6oAh5fMRjHVUbwyAhLcphUfhBDeOzTc6jLWF+QfmuOgImj9ix YEHLxdsjHa31JulmyZomFWMUGsgMqr1OkN71qYo6GLdS19U5eflBuSHakrpBtbJvWIbCuOodY 6bwDzPvsmiPocd45cJJABFVoOHRG7jG3581dayWZhEdirTuOQbBi57ujwwAs2e+PpFLYnmitV w5JRy6FAMk5z3WyK3DmeDUmVJ1hIPWauW1nRawLH9pSBICCPq5NsdbQZ5hFu742gnAjBiIuHd 4eJXxg7rR+gYIWsg+YmC3x52SJ49PmwAVCva7p/eqc8W6B0ujHu06il2ADr4PI5tEINr0UGkc fNtp0WMMoPX7pIM7sNWW2ueVn8EfwSeWpZe5Af6QnOJWbvLZd7I0/yuv6RKSz/vQHNN+CC8Hv S0J2tBZkBUHyjw0iyQbn8T/F4NdDzXwjTDP+jpZr2vlhdGzRS9JMTzZQfgIWPCMWgRYp0AN5b sTK+WTY0H0YrDOQpWTyrTvKSn6sKCXzGHV0PLvZcLZQJq7owJ6N6E6uuGkknZzBq1zMdiiJ/o zsyl1yw2Ev6p9LSvFv0aXPIdZzt3yOYYoy8RnjPtjSj77Sk29PQkSMRu3xFgtbdkVf/nG3KL3 ZhgzFXRJh68IPqWl5ctxE1oQctLxr0mLISyr40tX95GPc7K76tA0HrHVkrlveqVwKCsjd3nPB kvrVP+QqMea4742IzfmxKE97qnbRM8ZPOkilKafLrE6H301Df4Q8rGYMrtxMiwydOSOot2iVP oiV385cZYHtivuGheedCZc6hcKcRVYP+cINy0IAP3WSpj8WsTRw+p1HbIrz2eand1XvDygW1s MTzsRvdp6CSDOivHF8CUh/y5AA0PtUK7whx1noHMK8vVfwQNnz5RreA0n2cNsrLsm7rs/x7Ym NuqbI= X-Rspamd-Queue-Id: 468DsV6C95z4Qkl X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Kuar956l; dmarc=none; spf=none (mx1.freebsd.org: domain of ohartmann@walstatt.org has no SPF policy when checking 212.227.17.22) smtp.mailfrom=ohartmann@walstatt.org X-Spamd-Result: default: False [-3.79 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; RECEIVED_SPAMHAUS_PBL(0.00)[15.81.88.46.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; 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]; DMARC_NA(0.00)[walstatt.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.03)[ip: (-6.02), ipnet: 212.227.0.0/16(-1.37), asn: 8560(2.25), country: DE(-0.01)]; DKIM_TRACE(0.00)[gmx.net:+]; NEURAL_HAM_SHORT(-0.86)[-0.861,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[22.17.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 05:05:04 -0000 On Wed, 14 Aug 2019 22:33:46 +0000 (UTC) "Simon J. Gerraty" wrote: > Author: sjg > Date: Wed Aug 14 22:33:46 2019 > New Revision: 351055 > URL: https://svnweb.freebsd.org/changeset/base/351055 > > Log: > bsd.files.mk: fix targets to avoid directories > > Reintroduce :T when file is used as part of a target name. > > Reviewed by: stevek > > Modified: > head/share/mk/bsd.files.mk > > Modified: head/share/mk/bsd.files.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > --- head/share/mk/bsd.files.mk Wed Aug 14 22:13:11 2019 > (r351054) +++ head/share/mk/bsd.files.mk Wed Aug 14 22:33:46 > 2019 (r351055) @@ -101,11 +101,11 @@ STAGE_AS_SETS+=3D ${file} > STAGE_AS_${file}=3D ${${group}NAME_${file}} > # XXX {group}OWN,GRP,MODE > STAGE_DIR.${file}=3D ${STAGE_OBJTOP}${${_${group}DIR_${file}}} > -stage_as.${file}: ${file} > +stage_as.${file:T}: ${file} > > installfiles-${group}: _${group}INS1_${file} > -_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} > _${group}INS_${file} -_${group}INS_${file}: ${file} > +_${group}INS1_${file:T}: installdirs-${_${group}DIR_${file}} > _${group}INS_${file} +_${group}INS_${file:T}: ${file} > ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \ > -g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \ > ${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}} > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" This commit seems to break "make installworld" by this error during instal= l: [...] =3D=3D=3D> share/doc (install) =3D=3D=3D> share/doc/IPv6 (install) installing DIRS FILESDIR install -d -m 0755 -o root -g wheel /usr/share/doc/IPv6 install -o root -g wheel -m 444 /usr/src/share/doc/IPv6/IMPLEMENTATION /usr/share/doc/IPv6/IMPLEMENTATION =3D=3D=3D> share/doc/legal (install) =3D=3D=3D> share/doc/legal/intel_ipw (install) make[7]: don't know how to make _FILESINS1_/usr/src/sys/contrib/dev/ipw/LICENSE. Stop make[7]: stopped in /usr/src/share/doc/legal/intel_ipw *** Error code 2 From owner-svn-src-head@freebsd.org Thu Aug 15 05:59:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3DEBC82FA; Thu, 15 Aug 2019 05:59:46 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468G4W5ksQz4Sft; Thu, 15 Aug 2019 05:59:35 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108159.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7F5wgYR023971; Wed, 14 Aug 2019 22:59:33 -0700 Received: from nam03-by2-obe.outbound.protection.outlook.com (mail-by2nam03lp2050.outbound.protection.outlook.com [104.47.42.50]) by mx0a-00273201.pphosted.com with ESMTP id 2ucwagr9rb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Aug 2019 22:59:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z6isw9z3OktlrSGHp/tmC+hGcjnBoW2JopONVg7zoS31COm9UM3lV09JG9ZbCgraOdjsY2jUyr22Xq48xaH2VDM+OqudUtowdNdzxEaJkMWBthoGoPkdKvCcWmU9nrZx0/G25BxvbCJbMohmH24UU505DofiLV5zqm7O4m/3WH9IRc1CJZa47BaDJE2tIpd2oQ0qoNfcT/Mz/mVwcAQSF/6lmjPtrPIGqD5afjqvNHSvfTWrX9I9VdSNBwRPLkY+wIEQig6cyyRaRnka4BjckSEz6K5Kdt8VMaqascWHrqqKXbqFzVhZIML1T7w0uR1+EriMo//Pz5I2oCp3f6RfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RjfUyec/p1dEZS34MWVrXZlP7iM2ogkxd1xk2tcbXuI=; b=HHMFbw621RDj/SqGT90DtfO9i08JAZaYEAQY8tPTzpp5+LVNhiej9AJF0DHyoqDA1ngBeA9jX2f7Cy4U28cTfTzN0yE4EIyMRFx+5Y3L0MqXsfRnmDpy38578qYAzws8rNyrZGL49Gy1S40ePmtIdTDw5+vh95USH+7x6mKHpZ4YHhcXaHnaa3Bg/OFdS2fXTYCetmAXSrGBGJgAb+driIoGZ4yd5DBKrr2TF91WXGfeyvrirY+kQtLaV7OXx9KhZCIX28PqzjUC7nD0rpYKyccovrgsQuniXVpP9lOecdnOhzeVsg1wmf4b57va8Gamfpq21KXhCNEAC2ImR/6Hbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.12) smtp.rcpttodomain=walstatt.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from BN7PR05CA0012.namprd05.prod.outlook.com (2603:10b6:406:ee::25) by CY4PR05MB3320.namprd05.prod.outlook.com (2603:10b6:910:58::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.14; Thu, 15 Aug 2019 05:59:31 +0000 Received: from BY2NAM05FT023.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::205) by BN7PR05CA0012.outlook.office365.com (2603:10b6:406:ee::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.11 via Frontend Transport; Thu, 15 Aug 2019 05:59:31 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by BY2NAM05FT023.mail.protection.outlook.com (10.152.100.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.6 via Frontend Transport; Thu, 15 Aug 2019 05:59:30 +0000 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 14 Aug 2019 22:59:30 -0700 Received: from P-EXBEND-EQX-02.jnpr.net (10.104.8.53) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 14 Aug 2019 22:59:29 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-02.jnpr.net (10.104.8.53) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 14 Aug 2019 22:59:29 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.50.162]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id x7F5xSoB030346; Wed, 14 Aug 2019 22:59:29 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id C74383C00B; Wed, 14 Aug 2019 22:59:28 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id C6CB33C00A; Wed, 14 Aug 2019 22:59:28 -0700 (PDT) To: "O. Hartmann" CC: , , , Subject: Re: svn commit: r351055 - head/share/mk In-Reply-To: <20190815065907.6537c2d1@freyja> References: <201908142233.x7EMXkS6052288@repo.freebsd.org> <20190815065907.6537c2d1@freyja> Comments: In-reply-to: "O. Hartmann" message dated "Thu, 15 Aug 2019 06:59:12 +0200." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <46650.1565848768.1@kaos.jnpr.net> Date: Wed, 14 Aug 2019 22:59:28 -0700 Message-ID: <47894.1565848768@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(4636009)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(189003)(199004)(5660300002)(97756001)(46406003)(19627235002)(4326008)(9686003)(26005)(54906003)(7696005)(76176011)(16586007)(76506006)(55016002)(186003)(316002)(86362001)(229853002)(4744005)(11346002)(476003)(53936002)(305945005)(7126003)(6266002)(446003)(6246003)(70206006)(486006)(6916009)(47776003)(336012)(107886003)(356004)(97876018)(23726003)(2906002)(117636001)(8676002)(126002)(81156014)(81166006)(478600001)(53416004)(50466002)(8936002)(50226002)(70586007); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR05MB3320; H:P-EXFEND-EQX-01.jnpr.net; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2fd43bcd-4549-462c-dd74-08d72145bd0d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(4710121)(4711136)(1401327)(2017052603328); SRVR:CY4PR05MB3320; X-MS-TrafficTypeDiagnostic: CY4PR05MB3320: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:176; X-Forefront-PRVS: 01304918F3 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: jukK+ii8I6wi+HjZR8cSTXSEh462XIUIfslk5nagPHGyo4Dy/Swxp/OvT9FcrXj7h43z3Anj9Vs87h5xxcc1xi2OCugsiBK7kZFHbI8wXDYb+cucENQLi4llARH2xnY07VHp2mL3rELyLnVZWR1eRjcfWzvJz18LUMC2c4eFibq7qCDnMCjFGl/ASQU9/RdlDQF7+YI9b3+fIlPCEZxuQ1t5I6VmSE4x+KUNplghm2vwoBQpq6vX+8DgQq5fhAqrSAS8WNCIzkec6wV6tjgv/o0lIm41+SYxs8mfK6pqCFPBUycJo6ixW+T0zUmDTTFgYoYDqpdLY/WsnlSYPDuQA9+m4lDbc77gyy1AqBh5t1vAEPhObbrUo+Plnvkqdly11cB+FyqSqbjJpi7KpxfLlLqhXUGbEOmm6cmLYh2WjPY= X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2019 05:59:30.4156 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2fd43bcd-4549-462c-dd74-08d72145bd0d X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR05MB3320 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-08-15_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=727 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908150062 X-Rspamd-Queue-Id: 468G4W5ksQz4Sft X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.35 / 15.00]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:208.84.65.16]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.36)[ip: (-0.69), ipnet: 208.84.65.0/24(-0.34), asn: 26211(-0.71), country: US(-0.05)]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; NEURAL_HAM_SHORT(-0.89)[-0.890,0]; RCVD_IN_DNSWL_LOW(-0.10)[16.65.84.208.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US]; ARC_ALLOW(-1.00)[i=1]; RCVD_COUNT_SEVEN(0.00)[11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 05:59:46 -0000 O. Hartmann wrote: > This commit seems to break "make installworld" by this error during install: Sorry, I'll revert if I cannot quickly spot the issue > > [...] > ===> share/doc (install) > ===> share/doc/IPv6 (install) > installing DIRS FILESDIR > install -d -m 0755 -o root -g wheel /usr/share/doc/IPv6 > install -o root -g wheel -m 444 /usr/src/share/doc/IPv6/IMPLEMENTATION > /usr/share/doc/IPv6/IMPLEMENTATION ===> share/doc/legal (install) > ===> share/doc/legal/intel_ipw (install) > make[7]: don't know how to make > _FILESINS1_/usr/src/sys/contrib/dev/ipw/LICENSE. Stop > > make[7]: stopped in /usr/src/share/doc/legal/intel_ipw > *** Error code 2 From owner-svn-src-head@freebsd.org Thu Aug 15 06:00:56 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69B9AC839E; Thu, 15 Aug 2019 06:00:56 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468G602Cjrz4Sq8; Thu, 15 Aug 2019 06:00:56 +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 2A5FDC1A2; Thu, 15 Aug 2019 06:00:56 +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 x7F60uxY013187; Thu, 15 Aug 2019 06:00:56 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7F60ud8013186; Thu, 15 Aug 2019 06:00:56 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201908150600.x7F60ud8013186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 15 Aug 2019 06:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351067 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 351067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 06:00:56 -0000 Author: sjg Date: Thu Aug 15 06:00:55 2019 New Revision: 351067 URL: https://svnweb.freebsd.org/changeset/base/351067 Log: Revert prior change till installworld sorted Modified: head/share/mk/bsd.files.mk Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Thu Aug 15 04:47:42 2019 (r351066) +++ head/share/mk/bsd.files.mk Thu Aug 15 06:00:55 2019 (r351067) @@ -101,11 +101,11 @@ STAGE_AS_SETS+= ${file} STAGE_AS_${file}= ${${group}NAME_${file}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}} -stage_as.${file:T}: ${file} +stage_as.${file}: ${file} installfiles-${group}: _${group}INS1_${file} -_${group}INS1_${file:T}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} -_${group}INS_${file:T}: ${file} +_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} +_${group}INS_${file}: ${file} ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \ -g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \ ${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}} From owner-svn-src-head@freebsd.org Thu Aug 15 12:01:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AE3CCF2D7; Thu, 15 Aug 2019 12:01:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Q5R6RNGz3H9j; Thu, 15 Aug 2019 12:00:59 +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 A074A182A1; Thu, 15 Aug 2019 12:00:59 +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 x7FC0xRj028752; Thu, 15 Aug 2019 12:00:59 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FC0xXV028751; Thu, 15 Aug 2019 12:00:59 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201908151200.x7FC0xXV028751@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, 15 Aug 2019 12:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351068 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 351068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 12:01:00 -0000 Author: 0mp (ports committer) Date: Thu Aug 15 12:00:59 2019 New Revision: 351068 URL: https://svnweb.freebsd.org/changeset/base/351068 Log: pf tests: Fix accidental duplication of content Some files got their contented duplicated in r345409. Some mistakes where fixed in r345430. The only file that was left with a duplicated content was CVE-2019-5598.py. Reviewed by: kp Approved by: src (kp) Differential Revision: https://reviews.freebsd.org/D21267 Modified: head/tests/sys/netpfil/pf/CVE-2019-5598.py Modified: head/tests/sys/netpfil/pf/CVE-2019-5598.py ============================================================================== --- head/tests/sys/netpfil/pf/CVE-2019-5598.py Thu Aug 15 06:00:55 2019 (r351067) +++ head/tests/sys/netpfil/pf/CVE-2019-5598.py Thu Aug 15 12:00:59 2019 (r351068) @@ -63,68 +63,3 @@ def main(): if __name__ == '__main__': main() -#!/usr/local/bin/python2.7 - -import argparse -import scapy.all as sp -import sys -from sniffer import Sniffer - -def check_icmp_error(args, packet): - ip = packet.getlayer(sp.IP) - if not ip: - return False - if ip.dst != args.to[0]: - return False - - icmp = packet.getlayer(sp.ICMP) - if not icmp: - return False - if icmp.type != 3 or icmp.code != 3: - return False - - return True - -def main(): - parser = argparse.ArgumentParser("CVE-2019-icmp.py", - description="CVE-2019-icmp test tool") - parser.add_argument('--sendif', nargs=1, - required=True, - help='The interface through which the packet will be sent') - parser.add_argument('--recvif', nargs=1, - required=True, - help='The interface on which to check for the packet') - parser.add_argument('--src', nargs=1, - required=True, - help='The source IP address') - parser.add_argument('--to', nargs=1, - required=True, - help='The destination IP address') - - args = parser.parse_args() - - # Send the allowed packet to establish state - udp = sp.Ether() / \ - sp.IP(src=args.src[0], dst=args.to[0]) / \ - sp.UDP(dport=53, sport=1234) - sp.sendp(udp, iface=args.sendif[0], verbose=False) - - # Start sniffing on recvif - sniffer = Sniffer(args, check_icmp_error) - - # Send the bad error packet - icmp_reachable = sp.Ether() / \ - sp.IP(src=args.src[0], dst=args.to[0]) / \ - sp.ICMP(type=3, code=3) / \ - sp.IP(src=args.src[0], dst=args.to[0]) / \ - sp.UDP(dport=53, sport=1234) - sp.sendp(icmp_reachable, iface=args.sendif[0], verbose=False) - - sniffer.join() - if sniffer.foundCorrectPacket: - sys.exit(1) - - sys.exit(0) - -if __name__ == '__main__': - main() From owner-svn-src-head@freebsd.org Thu Aug 15 12:48:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB910A859C; Thu, 15 Aug 2019 12:48:18 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468R824yZHz3KDd; Thu, 15 Aug 2019 12:48:18 +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 8B93B18B6D; Thu, 15 Aug 2019 12:48:18 +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 x7FCmIaf056411; Thu, 15 Aug 2019 12:48:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FCmIoV056409; Thu, 15 Aug 2019 12:48:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908151248.x7FCmIoV056409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 12:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351069 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 351069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 12:48:18 -0000 Author: emaste Date: Thu Aug 15 12:48:17 2019 New Revision: 351069 URL: https://svnweb.freebsd.org/changeset/base/351069 Log: do not enable userland retpoline if not supported by compiler/linker Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21101 Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Thu Aug 15 12:00:59 2019 (r351068) +++ head/share/mk/bsd.lib.mk Thu Aug 15 12:48:17 2019 (r351069) @@ -3,6 +3,8 @@ # .include +.include +.include .if defined(LIB_CXX) || defined(SHLIB_CXX) _LD= ${CXX} @@ -74,9 +76,13 @@ TAG_ARGS= -T ${TAGS:[*]:S/ /,/g} LDFLAGS+= -Wl,-znow .endif .if ${MK_RETPOLINE} != "no" +.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline} CFLAGS+= -mretpoline CXXFLAGS+= -mretpoline LDFLAGS+= -Wl,-zretpolineplt +.else +.warning Retpoline requested but not supported by compiler or linker +.endif .endif .if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \ Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Aug 15 12:00:59 2019 (r351068) +++ head/share/mk/bsd.prog.mk Thu Aug 15 12:48:17 2019 (r351069) @@ -3,6 +3,7 @@ .include .include +.include .SUFFIXES: .out .o .bc .c .cc .cpp .cxx .C .m .y .l .ll .ln .s .S .asm @@ -44,11 +45,15 @@ CXXFLAGS+= -fPIE LDFLAGS+= -pie .endif .if ${MK_RETPOLINE} != "no" +.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline} CFLAGS+= -mretpoline CXXFLAGS+= -mretpoline # retpolineplt is broken with static linking (PR 233336) .if !defined(NO_SHARED) || ${NO_SHARED:tl} == "no" LDFLAGS+= -Wl,-zretpolineplt +.endif +.else +.warning Retpoline requested but not supported by compiler or linker .endif .endif From owner-svn-src-head@freebsd.org Thu Aug 15 13:28:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CAA3A97E6; Thu, 15 Aug 2019 13:28:08 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468S1z6PHhz3M2p; Thu, 15 Aug 2019 13:28:07 +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 D1D8219299; Thu, 15 Aug 2019 13:28:07 +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 x7FDS7fH080178; Thu, 15 Aug 2019 13:28:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FDRwOw080111; Thu, 15 Aug 2019 13:27:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908151327.x7FDRwOw080111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 13:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351070 - in head/contrib/telnet: arpa libtelnet telnet telnetd X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/contrib/telnet: arpa libtelnet telnet telnetd X-SVN-Commit-Revision: 351070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 13:28:08 -0000 Author: emaste Date: Thu Aug 15 13:27:57 2019 New Revision: 351070 URL: https://svnweb.freebsd.org/changeset/base/351070 Log: telnet: remove 3rd clause from Berkeley copyrights Per the July 22, 1999 letter (in /COPYRIGHT) from William Hoskins Director, Office of Technology Licensing University of California, Berkeley MFC after: 1 week Modified: head/contrib/telnet/arpa/telnet.h head/contrib/telnet/libtelnet/auth-proto.h head/contrib/telnet/libtelnet/auth.c head/contrib/telnet/libtelnet/auth.h head/contrib/telnet/libtelnet/enc-proto.h head/contrib/telnet/libtelnet/enc_des.c head/contrib/telnet/libtelnet/encrypt.c head/contrib/telnet/libtelnet/encrypt.h head/contrib/telnet/libtelnet/genget.c head/contrib/telnet/libtelnet/getent.c head/contrib/telnet/libtelnet/kerberos.c head/contrib/telnet/libtelnet/kerberos5.c head/contrib/telnet/libtelnet/key-proto.h head/contrib/telnet/libtelnet/krb4encpwd.c head/contrib/telnet/libtelnet/misc-proto.h head/contrib/telnet/libtelnet/misc.c head/contrib/telnet/libtelnet/misc.h head/contrib/telnet/libtelnet/read_password.c head/contrib/telnet/libtelnet/rsaencpwd.c head/contrib/telnet/telnet/authenc.c head/contrib/telnet/telnet/commands.c head/contrib/telnet/telnet/defines.h head/contrib/telnet/telnet/externs.h head/contrib/telnet/telnet/fdset.h head/contrib/telnet/telnet/general.h head/contrib/telnet/telnet/main.c head/contrib/telnet/telnet/network.c head/contrib/telnet/telnet/ring.c head/contrib/telnet/telnet/ring.h head/contrib/telnet/telnet/sys_bsd.c head/contrib/telnet/telnet/telnet.1 head/contrib/telnet/telnet/telnet.c head/contrib/telnet/telnet/terminal.c head/contrib/telnet/telnet/types.h head/contrib/telnet/telnet/utilities.c head/contrib/telnet/telnetd/authenc.c head/contrib/telnet/telnetd/defs.h head/contrib/telnet/telnetd/ext.h head/contrib/telnet/telnetd/global.c head/contrib/telnet/telnetd/pathnames.h head/contrib/telnet/telnetd/slc.c head/contrib/telnet/telnetd/state.c head/contrib/telnet/telnetd/sys_term.c head/contrib/telnet/telnetd/telnetd.8 head/contrib/telnet/telnetd/telnetd.c head/contrib/telnet/telnetd/telnetd.h head/contrib/telnet/telnetd/termstat.c head/contrib/telnet/telnetd/utility.c Modified: head/contrib/telnet/arpa/telnet.h ============================================================================== --- head/contrib/telnet/arpa/telnet.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/arpa/telnet.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/auth-proto.h ============================================================================== --- head/contrib/telnet/libtelnet/auth-proto.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/auth-proto.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/auth.c ============================================================================== --- head/contrib/telnet/libtelnet/auth.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/auth.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/auth.h ============================================================================== --- head/contrib/telnet/libtelnet/auth.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/auth.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/enc-proto.h ============================================================================== --- head/contrib/telnet/libtelnet/enc-proto.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/enc-proto.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/enc_des.c ============================================================================== --- head/contrib/telnet/libtelnet/enc_des.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/enc_des.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- head/contrib/telnet/libtelnet/encrypt.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/encrypt.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/encrypt.h ============================================================================== --- head/contrib/telnet/libtelnet/encrypt.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/encrypt.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/genget.c ============================================================================== --- head/contrib/telnet/libtelnet/genget.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/genget.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/getent.c ============================================================================== --- head/contrib/telnet/libtelnet/getent.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/getent.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/kerberos.c ============================================================================== --- head/contrib/telnet/libtelnet/kerberos.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/kerberos.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/kerberos5.c ============================================================================== --- head/contrib/telnet/libtelnet/kerberos5.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/kerberos5.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/key-proto.h ============================================================================== --- head/contrib/telnet/libtelnet/key-proto.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/key-proto.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/krb4encpwd.c ============================================================================== --- head/contrib/telnet/libtelnet/krb4encpwd.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/krb4encpwd.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/misc-proto.h ============================================================================== --- head/contrib/telnet/libtelnet/misc-proto.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/misc-proto.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/misc.c ============================================================================== --- head/contrib/telnet/libtelnet/misc.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/misc.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/misc.h ============================================================================== --- head/contrib/telnet/libtelnet/misc.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/misc.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/read_password.c ============================================================================== --- head/contrib/telnet/libtelnet/read_password.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/read_password.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/libtelnet/rsaencpwd.c ============================================================================== --- head/contrib/telnet/libtelnet/rsaencpwd.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/libtelnet/rsaencpwd.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/authenc.c ============================================================================== --- head/contrib/telnet/telnet/authenc.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/authenc.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/commands.c ============================================================================== --- head/contrib/telnet/telnet/commands.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/commands.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/defines.h ============================================================================== --- head/contrib/telnet/telnet/defines.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/defines.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/externs.h ============================================================================== --- head/contrib/telnet/telnet/externs.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/externs.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/fdset.h ============================================================================== --- head/contrib/telnet/telnet/fdset.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/fdset.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/general.h ============================================================================== --- head/contrib/telnet/telnet/general.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/general.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/main.c ============================================================================== --- head/contrib/telnet/telnet/main.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/main.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/network.c ============================================================================== --- head/contrib/telnet/telnet/network.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/network.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/ring.c ============================================================================== --- head/contrib/telnet/telnet/ring.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/ring.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/ring.h ============================================================================== --- head/contrib/telnet/telnet/ring.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/ring.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/sys_bsd.c ============================================================================== --- head/contrib/telnet/telnet/sys_bsd.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/sys_bsd.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/telnet.1 ============================================================================== --- head/contrib/telnet/telnet/telnet.1 Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/telnet.1 Thu Aug 15 13:27:57 2019 (r351070) @@ -9,11 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: head/contrib/telnet/telnet/telnet.c ============================================================================== --- head/contrib/telnet/telnet/telnet.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/telnet.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/terminal.c ============================================================================== --- head/contrib/telnet/telnet/terminal.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/terminal.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/types.h ============================================================================== --- head/contrib/telnet/telnet/types.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/types.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnet/utilities.c ============================================================================== --- head/contrib/telnet/telnet/utilities.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnet/utilities.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/authenc.c ============================================================================== --- head/contrib/telnet/telnetd/authenc.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/authenc.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/defs.h ============================================================================== --- head/contrib/telnet/telnetd/defs.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/defs.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/ext.h ============================================================================== --- head/contrib/telnet/telnetd/ext.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/ext.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/global.c ============================================================================== --- head/contrib/telnet/telnetd/global.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/global.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/pathnames.h ============================================================================== --- head/contrib/telnet/telnetd/pathnames.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/pathnames.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/slc.c ============================================================================== --- head/contrib/telnet/telnetd/slc.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/slc.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/state.c ============================================================================== --- head/contrib/telnet/telnetd/state.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/state.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/sys_term.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/telnetd.8 ============================================================================== --- head/contrib/telnet/telnetd/telnetd.8 Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/telnetd.8 Thu Aug 15 13:27:57 2019 (r351070) @@ -9,11 +9,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/telnetd.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/telnetd.h ============================================================================== --- head/contrib/telnet/telnetd/telnetd.h Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/telnetd.h Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/termstat.c ============================================================================== --- head/contrib/telnet/telnetd/termstat.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/termstat.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/contrib/telnet/telnetd/utility.c ============================================================================== --- head/contrib/telnet/telnetd/utility.c Thu Aug 15 12:48:17 2019 (r351069) +++ head/contrib/telnet/telnetd/utility.c Thu Aug 15 13:27:57 2019 (r351070) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-head@freebsd.org Thu Aug 15 13:44:34 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60916A9D1A; Thu, 15 Aug 2019 13:44:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468SNy1lqSz3Ml4; Thu, 15 Aug 2019 13:44:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DF4C19633; Thu, 15 Aug 2019 13:44:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FDiYI6092329; Thu, 15 Aug 2019 13:44:34 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FDiXLC092328; Thu, 15 Aug 2019 13:44:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201908151344.x7FDiXLC092328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 15 Aug 2019 13:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351071 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 351071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 13:44:34 -0000 Author: ae Date: Thu Aug 15 13:44:33 2019 New Revision: 351071 URL: https://svnweb.freebsd.org/changeset/base/351071 Log: Fix rule truncation on external action module unloading. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_eaction.c Modified: head/sys/netpfil/ipfw/ip_fw_eaction.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_eaction.c Thu Aug 15 13:27:57 2019 (r351070) +++ head/sys/netpfil/ipfw/ip_fw_eaction.c Thu Aug 15 13:44:33 2019 (r351071) @@ -391,19 +391,19 @@ ipfw_reset_eaction(struct ip_fw_chain *ch, struct ip_f cmd->arg1 != eaction_id) return (0); /* - * If instance_id is specified, we need to truncate the - * rule length. Check if there is O_EXTERNAL_INSTANCE opcode. + * Check if there is O_EXTERNAL_INSTANCE opcode, we need + * to truncate the rule length. * * NOTE: F_LEN(cmd) must be 1 for O_EXTERNAL_ACTION opcode, * and rule length should be enough to keep O_EXTERNAL_INSTANCE * opcode, thus we do check for l > 1. */ l = rule->cmd + rule->cmd_len - cmd; - if (instance_id != 0 && l > 1) { + if (l > 1) { MPASS(F_LEN(cmd) == 1); icmd = cmd + 1; - if (icmd->opcode != O_EXTERNAL_INSTANCE || - icmd->arg1 != instance_id) + if (icmd->opcode == O_EXTERNAL_INSTANCE && + instance_id != 0 && icmd->arg1 != instance_id) return (0); /* * Since named_object related to this instance will be From owner-svn-src-head@freebsd.org Thu Aug 15 14:11:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A416AA8F4; Thu, 15 Aug 2019 14:11:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Szg70Dwz3NwQ; Thu, 15 Aug 2019 14:11:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1C7B19A0A; Thu, 15 Aug 2019 14:11:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FEBBgn006472; Thu, 15 Aug 2019 14:11:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FEBBkd006468; Thu, 15 Aug 2019 14:11:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908151411.x7FEBBkd006468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Aug 2019 14:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351072 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 351072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 14:11:12 -0000 Author: mav Date: Thu Aug 15 14:11:11 2019 New Revision: 351072 URL: https://svnweb.freebsd.org/changeset/base/351072 Log: Implement new methods for Intel and PLX NTB. This restores parity with AMD NTB driver. Though without any drivers supporting more then one peer and respective KPI modification to pass peer index to most of the calls this addition is pretty useless now. MFC after: 2 weeks Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Aug 15 13:44:33 2019 (r351071) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Thu Aug 15 14:11:11 2019 (r351072) @@ -1978,6 +1978,44 @@ atom_perform_link_restart(struct ntb_softc *ntb) } static int +intel_ntb_port_number(device_t dev) +{ + struct ntb_softc *ntb = device_get_softc(dev); + + return (ntb->dev_type == NTB_DEV_USD ? 0 : 1); +} + +static int +intel_ntb_peer_port_count(device_t dev) +{ + + return (1); +} + +static int +intel_ntb_peer_port_number(device_t dev, int pidx) +{ + struct ntb_softc *ntb = device_get_softc(dev); + + if (pidx != 0) + return (-EINVAL); + + return (ntb->dev_type == NTB_DEV_USD ? 1 : 0); +} + +static int +intel_ntb_peer_port_idx(device_t dev, int port) +{ + int peer_port; + + peer_port = intel_ntb_peer_port_number(dev, 0); + if (peer_port == -EINVAL || port != peer_port) + return (-EINVAL); + + return (0); +} + +static int intel_ntb_link_enable(device_t dev, enum ntb_speed speed __unused, enum ntb_width width __unused) { @@ -3087,6 +3125,10 @@ static device_method_t ntb_intel_methods[] = { DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), /* NTB interface */ + DEVMETHOD(ntb_port_number, intel_ntb_port_number), + DEVMETHOD(ntb_peer_port_count, intel_ntb_peer_port_count), + DEVMETHOD(ntb_peer_port_number, intel_ntb_peer_port_number), + DEVMETHOD(ntb_peer_port_idx, intel_ntb_peer_port_idx), DEVMETHOD(ntb_link_is_up, intel_ntb_link_is_up), DEVMETHOD(ntb_link_enable, intel_ntb_link_enable), DEVMETHOD(ntb_link_disable, intel_ntb_link_disable), Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Aug 15 13:44:33 2019 (r351071) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_plx.c Thu Aug 15 14:11:11 2019 (r351072) @@ -470,7 +470,44 @@ ntb_plx_detach(device_t dev) return (0); } +static int +ntb_plx_port_number(device_t dev) +{ + struct ntb_plx_softc *sc = device_get_softc(dev); + return (sc->link ? 1 : 0); +} + +static int +ntb_plx_peer_port_count(device_t dev) +{ + + return (1); +} + +static int +ntb_plx_peer_port_number(device_t dev, int pidx) +{ + struct ntb_plx_softc *sc = device_get_softc(dev); + + if (pidx != 0) + return (-EINVAL); + + return (sc->link ? 0 : 1); +} + +static int +ntb_plx_peer_port_idx(device_t dev, int port) +{ + int peer_port; + + peer_port = ntb_plx_peer_port_number(dev, 0); + if (peer_port == -EINVAL || port != peer_port) + return (-EINVAL); + + return (0); +} + static bool ntb_plx_link_is_up(device_t dev, enum ntb_speed *speed, enum ntb_width *width) { @@ -974,6 +1011,10 @@ static device_method_t ntb_plx_methods[] = { DEVMETHOD(bus_child_location_str, ntb_child_location_str), DEVMETHOD(bus_print_child, ntb_print_child), /* NTB interface */ + DEVMETHOD(ntb_port_number, ntb_plx_port_number), + DEVMETHOD(ntb_peer_port_count, ntb_plx_peer_port_count), + DEVMETHOD(ntb_peer_port_number, ntb_plx_peer_port_number), + DEVMETHOD(ntb_peer_port_idx, ntb_plx_peer_port_idx), DEVMETHOD(ntb_link_is_up, ntb_plx_link_is_up), DEVMETHOD(ntb_link_enable, ntb_plx_link_enable), DEVMETHOD(ntb_link_disable, ntb_plx_link_disable), From owner-svn-src-head@freebsd.org Thu Aug 15 14:54:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3468EAB981; Thu, 15 Aug 2019 14:54:19 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468TxR0b27z3wbj; Thu, 15 Aug 2019 14:54:19 +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 E826A1A329; Thu, 15 Aug 2019 14:54:18 +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 x7FEsIXn038357; Thu, 15 Aug 2019 14:54:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FEsIU4038356; Thu, 15 Aug 2019 14:54:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908151454.x7FEsIU4038356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 14:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351073 - head/stand/i386/boot2 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/stand/i386/boot2 X-SVN-Commit-Revision: 351073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 14:54:19 -0000 Author: emaste Date: Thu Aug 15 14:54:18 2019 New Revision: 351073 URL: https://svnweb.freebsd.org/changeset/base/351073 Log: stand: remove CLANG_NO_IAS from boot2 Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including boot2, so CLANG_NO_IAS was not previously removed for those. In the case of boot2 the difference is that IAS produces a larger encoding for one instruction (the testb at the beginning of read). GNU as produces: 2e f6 06 b0 08 80 while IAS includes an address size override prefix (67) and produces: 2e 67 f6 05 b3 08 00 00 80 This results in three fewer NOPs elsewhere in boot2 but no functional change, so switch to IAS for boot2. (We can separately pursue improved 16-bit IAS support with the LLVM developers.) Sponsored by: The FreeBSD Foundation Modified: head/stand/i386/boot2/Makefile Modified: head/stand/i386/boot2/Makefile ============================================================================== --- head/stand/i386/boot2/Makefile Thu Aug 15 14:11:11 2019 (r351072) +++ head/stand/i386/boot2/Makefile Thu Aug 15 14:54:18 2019 (r351073) @@ -91,6 +91,3 @@ boot2.h: boot1.out REL1=`printf "%d" ${REL1}` > ${.TARGET} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.boot1.S= ${CLANG_NO_IAS} From owner-svn-src-head@freebsd.org Thu Aug 15 14:57:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7705ABAD3; Thu, 15 Aug 2019 14:57:29 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468V155975z3wn1; Thu, 15 Aug 2019 14:57:29 +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 79F721A333; Thu, 15 Aug 2019 14:57:29 +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 x7FEvTML038568; Thu, 15 Aug 2019 14:57:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FEvR2O038555; Thu, 15 Aug 2019 14:57:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908151457.x7FEvR2O038555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Aug 2019 14:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351074 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/... X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs... X-SVN-Commit-Revision: 351074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 14:57:29 -0000 Author: avg Date: Thu Aug 15 14:57:27 2019 New Revision: 351074 URL: https://svnweb.freebsd.org/changeset/base/351074 Log: MFV r350898: 8423 8199 7432 Implement large_dnode pool feature 8423 8199 7432 Implement large_dnode pool feature 8423 Implement large_dnode pool feature 8199 multi-threaded dmu_object_alloc() 7432 Large dnode pool feature llumos/illumos-gate@54811da5ac6b517992fdc173df5d605e4e61fdc0 https://github.com/illumos/illumos-gate/commit/54811da5ac6b517992fdc173df5d605e4e61fdc0 https://www.illumos.org/issues/8423 https://www.illumos.org/issues/8199 https://www.illumos.org/issues/7432 ZoL issues: Improved dnode allocation #6564 Clean up large dnode code #6262 Fix dnode_hold() freeing dnode behavior #8172 Fix dnode allocation race #6414, #6439 Partial: Raw sends must be able to decrease nlevels #6821, #6864 Remove unnecessary txg syncs from receive_object() Closes #7197 This updates FreeBSD large_dnode code (that was imported from ZoL) to a version that was committed to illumos. It has some cleanups, improvements and fixes comparing to what we have in FreeBSD now. I think that the most significant update is 8199 multi-threaded dmu_object_alloc(). Obtained from: illumos MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/sa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Aug 15 14:57:27 2019 (r351074) @@ -2134,7 +2134,8 @@ static object_viewer_t *object_viewer[DMU_OT_NUMTYPES }; static void -dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header) +dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header, + uint64_t *dnode_slots_used) { dmu_buf_t *db = NULL; dmu_object_info_t doi; @@ -2154,7 +2155,7 @@ dump_object(objset_t *os, uint64_t object, int verbosi CTASSERT(sizeof (bonus_size) >= NN_NUMBUF_SZ); if (*print_header) { - (void) printf("\n%10s %3s %5s %5s %5s %6s %5s %6s %s\n", + (void) printf("\n%10s %3s %5s %5s %5s %6s %5s %6s %s\n", "Object", "lvl", "iblk", "dblk", "dsize", "dnsize", "lsize", "%full", "type"); *print_header = 0; @@ -2173,6 +2174,9 @@ dump_object(objset_t *os, uint64_t object, int verbosi } dmu_object_info_from_dnode(dn, &doi); + if (dnode_slots_used != NULL) + *dnode_slots_used = doi.doi_dnodesize / DNODE_MIN_SIZE; + zdb_nicenum(doi.doi_metadata_block_size, iblk, sizeof (iblk)); zdb_nicenum(doi.doi_data_block_size, dblk, sizeof (dblk)); zdb_nicenum(doi.doi_max_offset, lsize, sizeof (lsize)); @@ -2195,8 +2199,9 @@ dump_object(objset_t *os, uint64_t object, int verbosi ZDB_COMPRESS_NAME(doi.doi_compress)); } - (void) printf("%10lld %3u %5s %5s %5s %6s %5s %6s %s%s\n", - (u_longlong_t)object, doi.doi_indirection, iblk, dblk, + (void) printf("%10" PRIu64 + " %3u %5s %5s %5s %5s %5s %6s %s%s\n", + object, doi.doi_indirection, iblk, dblk, asize, dnsize, lsize, fill, ZDB_OT_NAME(doi.doi_type), aux); if (doi.doi_bonus_type != DMU_OT_NONE && verbosity > 3) { @@ -2305,6 +2310,9 @@ dump_dir(objset_t *os) int print_header = 1; unsigned i; int error; + uint64_t total_slots_used = 0; + uint64_t max_slot_used = 0; + uint64_t dnode_slots; /* make sure nicenum has enough space */ CTASSERT(sizeof (numbuf) >= NN_NUMBUF_SZ); @@ -2349,7 +2357,7 @@ dump_dir(objset_t *os) if (zopt_objects != 0) { for (i = 0; i < zopt_objects; i++) dump_object(os, zopt_object[i], verbosity, - &print_header); + &print_header, NULL); (void) printf("\n"); return; } @@ -2374,22 +2382,37 @@ dump_dir(objset_t *os) if (BP_IS_HOLE(os->os_rootbp)) return; - dump_object(os, 0, verbosity, &print_header); + dump_object(os, 0, verbosity, &print_header, NULL); object_count = 0; if (DMU_USERUSED_DNODE(os) != NULL && DMU_USERUSED_DNODE(os)->dn_type != 0) { - dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header); - dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header); + dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header, + NULL); + dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header, + NULL); } object = 0; while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) { - dump_object(os, object, verbosity, &print_header); + dump_object(os, object, verbosity, &print_header, &dnode_slots); object_count++; + total_slots_used += dnode_slots; + max_slot_used = object + dnode_slots - 1; } (void) printf("\n"); + (void) printf(" Dnode slots:\n"); + (void) printf("\tTotal used: %10llu\n", + (u_longlong_t)total_slots_used); + (void) printf("\tMax used: %10llu\n", + (u_longlong_t)max_slot_used); + (void) printf("\tPercent empty: %10lf\n", + (double)(max_slot_used - total_slots_used)*100 / + (double)max_slot_used); + + (void) printf("\n"); + if (error != ESRCH) { (void) fprintf(stderr, "dmu_object_next() = %d\n", error); abort(); @@ -2581,7 +2604,7 @@ dump_path_impl(objset_t *os, uint64_t obj, char *name) return (dump_path_impl(os, child_obj, s + 1)); /*FALLTHROUGH*/ case DMU_OT_PLAIN_FILE_CONTENTS: - dump_object(os, child_obj, dump_opt['v'], &header); + dump_object(os, child_obj, dump_opt['v'], &header, NULL); return (0); default: (void) fprintf(stderr, "object %llu has non-file/directory " Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Thu Aug 15 14:57:27 2019 (r351074) @@ -84,15 +84,15 @@ zil_prt_rec_create(zilog_t *zilog, int txtype, void *a } (void) printf("%s%s", tab_prefix, ctime(&crtime)); - (void) printf("%sdoid %llu, foid %llu, slots %llu, mode %llo\n", tab_prefix, - (u_longlong_t)lr->lr_doid, - (u_longlong_t)LR_FOID_GET_OBJ(lr->lr_foid), - (u_longlong_t)LR_FOID_GET_SLOTS(lr->lr_foid), - (longlong_t)lr->lr_mode); - (void) printf("%suid %llu, gid %llu, gen %llu, rdev 0x%llx\n", - tab_prefix, - (u_longlong_t)lr->lr_uid, (u_longlong_t)lr->lr_gid, - (u_longlong_t)lr->lr_gen, (u_longlong_t)lr->lr_rdev); + (void) printf("%sdoid %" PRIu64 ", foid %" PRIu64 ", slots %" PRIu64 + ", mode %" PRIo64 "\n", + tab_prefix, lr->lr_doid, + (uint64_t)LR_FOID_GET_OBJ(lr->lr_foid), + (uint64_t)LR_FOID_GET_SLOTS(lr->lr_foid), + lr->lr_mode); + (void) printf("%suid %" PRIu64 ", gid %" PRIu64 ", gen %" PRIu64 + ", rdev %#" PRIx64 "\n", + tab_prefix, lr->lr_uid, lr->lr_gid, lr->lr_gen, lr->lr_rdev); } /* ARGSUSED */ Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Thu Aug 15 14:57:27 2019 (r351074) @@ -416,13 +416,15 @@ main(int argc, char *argv[]) drro->drr_toguid = BSWAP_64(drro->drr_toguid); } if (verbose) { - (void) printf("OBJECT object = %llu type = %u " - "bonustype = %u blksz = %u bonuslen = %u\n", - (u_longlong_t)drro->drr_object, + (void) printf("OBJECT object = %" PRIu64 + " type = %u bonustype = %u blksz = %u" + " bonuslen = %u dn_slots = %u\n", + drro->drr_object, drro->drr_type, drro->drr_bonustype, drro->drr_blksz, - drro->drr_bonuslen); + drro->drr_bonuslen, + drro->drr_dn_slots); } if (drro->drr_bonuslen > 0) { (void) ssread(buf, Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 15 14:57:27 2019 (r351074) @@ -196,6 +196,7 @@ extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; extern boolean_t zfs_compressed_arc_enabled; extern boolean_t zfs_abd_scatter_enabled; +extern int dmu_object_alloc_chunk_shift; extern boolean_t zfs_force_some_double_word_sm_entries; static ztest_shared_opts_t *ztest_shared_opts; @@ -322,6 +323,7 @@ static ztest_shared_callstate_t *ztest_shared_callstat ztest_func_t ztest_dmu_read_write; ztest_func_t ztest_dmu_write_parallel; ztest_func_t ztest_dmu_object_alloc_free; +ztest_func_t ztest_dmu_object_next_chunk; ztest_func_t ztest_dmu_commit_callbacks; ztest_func_t ztest_zap; ztest_func_t ztest_zap_parallel; @@ -363,6 +365,7 @@ ztest_info_t ztest_info[] = { { ztest_dmu_read_write, 1, &zopt_always }, { ztest_dmu_write_parallel, 10, &zopt_always }, { ztest_dmu_object_alloc_free, 1, &zopt_always }, + { ztest_dmu_object_next_chunk, 1, &zopt_sometimes }, { ztest_dmu_commit_callbacks, 1, &zopt_always }, { ztest_zap, 30, &zopt_always }, { ztest_zap_parallel, 100, &zopt_always }, @@ -1366,7 +1369,7 @@ ztest_bt_bonus(dmu_buf_t *db) * it unique to the object, generation, and offset to verify that data * is not getting overwritten by data from other dnodes. */ -#define ZTEST_BONUS_FILL_TOKEN(obj, ds, gen, offset) \ +#define ZTEST_BONUS_FILL_TOKEN(obj, ds, gen, offset) \ (((ds) << 48) | ((gen) << 32) | ((obj) << 8) | (offset)) /* @@ -1895,6 +1898,7 @@ ztest_replay_setattr(void *arg1, void *arg2, boolean_t ztest_bt_generate(bbt, os, lr->lr_foid, dnodesize, -1ULL, lr->lr_mode, txg, crtxg); ztest_fill_unused_bonus(db, bbt, lr->lr_foid, os, bbt->bt_gen); + dmu_buf_rele(db, FTAG); (void) ztest_log_setattr(zd, tx, lr); @@ -3815,8 +3819,10 @@ ztest_dmu_object_alloc_free(ztest_ds_t *zd, uint64_t i ztest_od_t od[4]; int batchsize = sizeof (od) / sizeof (od[0]); - for (int b = 0; b < batchsize; b++) - ztest_od_init(&od[b], id, FTAG, b, DMU_OT_UINT64_OTHER, 0, 0, 0); + for (int b = 0; b < batchsize; b++) { + ztest_od_init(&od[b], id, FTAG, b, DMU_OT_UINT64_OTHER, + 0, 0, 0); + } /* * Destroy the previous batch of objects, create a new batch, @@ -3831,6 +3837,26 @@ ztest_dmu_object_alloc_free(ztest_ds_t *zd, uint64_t i } /* + * Rewind the global allocator to verify object allocation backfilling. + */ +void +ztest_dmu_object_next_chunk(ztest_ds_t *zd, uint64_t id) +{ + objset_t *os = zd->zd_os; + int dnodes_per_chunk = 1 << dmu_object_alloc_chunk_shift; + uint64_t object; + + /* + * Rewind the global allocator randomly back to a lower object number + * to force backfilling and reclamation of recently freed dnodes. + */ + mutex_enter(&os->os_obj_lock); + object = ztest_random(os->os_obj_next_chunk); + os->os_obj_next_chunk = P2ALIGN(object, dnodes_per_chunk); + mutex_exit(&os->os_obj_lock); +} + +/* * Verify that dmu_{read,write} work as expected. */ void @@ -3876,8 +3902,10 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id) /* * Read the directory info. If it's the first time, set things up. */ - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, chunksize); - ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, chunksize); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, + chunksize); + ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, + chunksize); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -4146,8 +4174,10 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *zd, uint64_t id /* * Read the directory info. If it's the first time, set things up. */ - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); - ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, chunksize); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, + 0, 0); + ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, + chunksize); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -4347,7 +4377,8 @@ ztest_dmu_write_parallel(ztest_ds_t *zd, uint64_t id) * to verify that parallel writes to an object -- even to the * same blocks within the object -- doesn't cause any trouble. */ - ztest_od_init(&od[0], ID_PARALLEL, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, 0); + ztest_od_init(&od[0], ID_PARALLEL, FTAG, 0, DMU_OT_UINT64_OTHER, + 0, 0, 0); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -4366,7 +4397,8 @@ ztest_dmu_prealloc(ztest_ds_t *zd, uint64_t id) uint64_t blocksize = ztest_random_blocksize(); void *data; - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, + 0, 0); if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) return; @@ -4590,7 +4622,8 @@ ztest_zap_parallel(ztest_ds_t *zd, uint64_t id) char name[20], string_value[20]; void *data; - ztest_od_init(&od[0], ID_PARALLEL, FTAG, micro, DMU_OT_ZAP_OTHER, 0, 0, 0); + ztest_od_init(&od[0], ID_PARALLEL, FTAG, micro, DMU_OT_ZAP_OTHER, + 0, 0, 0); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -5411,7 +5444,8 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) blocksize = ztest_random_blocksize(); blocksize = MIN(blocksize, 2048); /* because we write so many */ - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, + 0, 0); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Thu Aug 15 14:57:27 2019 (r351074) @@ -292,10 +292,11 @@ zfs_prop_init(void) ZFS_VOLMODE_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT | ZFS_TYPE_VOLUME, "default | geom | dev | none", "VOLMODE", volmode_table); + zprop_register_index(ZFS_PROP_DNODESIZE, "dnodesize", ZFS_DNSIZE_LEGACY, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "legacy | auto | 1k | 2k | 4k | 8k | 16k", "DNSIZE", dnsize_table); - + /* inherit index (boolean) properties */ zprop_register_index(ZFS_PROP_ATIME, "atime", 1, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "on | off", "ATIME", boolean_table); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Aug 15 14:57:27 2019 (r351074) @@ -3757,7 +3757,8 @@ dbuf_write_ready(zio_t *zio, arc_buf_t *buf, void *vdb if (dn->dn_type == DMU_OT_DNODE) { i = 0; while (i < db->db.db_size) { - dnode_phys_t *dnp = db->db.db_data + i; + dnode_phys_t *dnp = + (void *)(((char *)db->db.db_data) + i); i += DNODE_MIN_SIZE; if (dnp->dn_type != DMU_OT_NONE) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Thu Aug 15 14:57:27 2019 (r351074) @@ -32,6 +32,14 @@ #include #include +/* + * Each of the concurrent object allocators will grab + * 2^dmu_object_alloc_chunk_shift dnode slots at a time. The default is to + * grab 128 slots, which is 4 blocks worth. This was experimentally + * determined to be the lowest value that eliminates the measurable effect + * of lock contention from this code path. + */ +int dmu_object_alloc_chunk_shift = 7; static uint64_t dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ot, int blocksize, @@ -44,6 +52,10 @@ dmu_object_alloc_impl(objset_t *os, dmu_object_type_t dnode_t *dn = NULL; int dn_slots = dnodesize >> DNODE_SHIFT; boolean_t restarted = B_FALSE; + uint64_t *cpuobj = &os->os_obj_next_percpu[CPU_SEQID % + os->os_obj_next_percpu_len]; + int dnodes_per_chunk = 1 << dmu_object_alloc_chunk_shift; + int error; if (dn_slots == 0) { dn_slots = DNODE_MIN_SLOTS; @@ -51,93 +63,145 @@ dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ASSERT3S(dn_slots, >=, DNODE_MIN_SLOTS); ASSERT3S(dn_slots, <=, DNODE_MAX_SLOTS); } - - mutex_enter(&os->os_obj_lock); + + /* + * The "chunk" of dnodes that is assigned to a CPU-specific + * allocator needs to be at least one block's worth, to avoid + * lock contention on the dbuf. It can be at most one L1 block's + * worth, so that the "rescan after polishing off a L1's worth" + * logic below will be sure to kick in. + */ + if (dnodes_per_chunk < DNODES_PER_BLOCK) + dnodes_per_chunk = DNODES_PER_BLOCK; + if (dnodes_per_chunk > L1_dnode_count) + dnodes_per_chunk = L1_dnode_count; + + object = *cpuobj; + for (;;) { - object = os->os_obj_next; /* - * Each time we polish off a L1 bp worth of dnodes (2^12 - * objects), move to another L1 bp that's still - * reasonably sparse (at most 1/4 full). Look from the - * beginning at most once per txg. If we still can't - * allocate from that L1 block, search for an empty L0 - * block, which will quickly skip to the end of the - * metadnode if the no nearby L0 blocks are empty. This - * fallback avoids a pathology where full dnode blocks - * containing large dnodes appear sparse because they - * have a low blk_fill, leading to many failed - * allocation attempts. In the long term a better - * mechanism to search for sparse metadnode regions, - * such as spacemaps, could be implemented. - * - * os_scan_dnodes is set during txg sync if enough objects - * have been freed since the previous rescan to justify - * backfilling again. - * - * Note that dmu_traverse depends on the behavior that we use - * multiple blocks of the dnode object before going back to - * reuse objects. Any change to this algorithm should preserve - * that property or find another solution to the issues - * described in traverse_visitbp. + * If we finished a chunk of dnodes, get a new one from + * the global allocator. */ - if (P2PHASE(object, L1_dnode_count) == 0) { - uint64_t offset; - uint64_t blkfill; - int minlvl; - int error; - if (os->os_rescan_dnodes) { - offset = 0; - os->os_rescan_dnodes = B_FALSE; - } else { - offset = object << DNODE_SHIFT; + if ((P2PHASE(object, dnodes_per_chunk) == 0) || + (P2PHASE(object + dn_slots - 1, dnodes_per_chunk) < + dn_slots)) { + DNODE_STAT_BUMP(dnode_alloc_next_chunk); + mutex_enter(&os->os_obj_lock); + ASSERT0(P2PHASE(os->os_obj_next_chunk, + dnodes_per_chunk)); + object = os->os_obj_next_chunk; + + /* + * Each time we polish off a L1 bp worth of dnodes + * (2^12 objects), move to another L1 bp that's + * still reasonably sparse (at most 1/4 full). Look + * from the beginning at most once per txg. If we + * still can't allocate from that L1 block, search + * for an empty L0 block, which will quickly skip + * to the end of the metadnode if the no nearby L0 + * blocks are empty. This fallback avoids a + * pathology where full dnode blocks containing + * large dnodes appear sparse because they have a + * low blk_fill, leading to many failed allocation + * attempts. In the long term a better mechanism to + * search for sparse metadnode regions, such as + * spacemaps, could be implemented. + * + * os_scan_dnodes is set during txg sync if enough + * objects have been freed since the previous + * rescan to justify backfilling again. + * + * Note that dmu_traverse depends on the behavior + * that we use multiple blocks of the dnode object + * before going back to reuse objects. Any change + * to this algorithm should preserve that property + * or find another solution to the issues described + * in traverse_visitbp. + */ + if (P2PHASE(object, L1_dnode_count) == 0) { + uint64_t offset; + uint64_t blkfill; + int minlvl; + if (os->os_rescan_dnodes) { + offset = 0; + os->os_rescan_dnodes = B_FALSE; + } else { + offset = object << DNODE_SHIFT; + } + blkfill = restarted ? 1 : DNODES_PER_BLOCK >> 2; + minlvl = restarted ? 1 : 2; + restarted = B_TRUE; + error = dnode_next_offset(DMU_META_DNODE(os), + DNODE_FIND_HOLE, &offset, minlvl, + blkfill, 0); + if (error == 0) { + object = offset >> DNODE_SHIFT; + } } - blkfill = restarted ? 1 : DNODES_PER_BLOCK >> 2; - minlvl = restarted ? 1 : 2; - restarted = B_TRUE; - error = dnode_next_offset(DMU_META_DNODE(os), - DNODE_FIND_HOLE, &offset, minlvl, blkfill, 0); - if (error == 0) - object = offset >> DNODE_SHIFT; + /* + * Note: if "restarted", we may find a L0 that + * is not suitably aligned. + */ + os->os_obj_next_chunk = + P2ALIGN(object, dnodes_per_chunk) + + dnodes_per_chunk; + (void) atomic_swap_64(cpuobj, object); + mutex_exit(&os->os_obj_lock); } - os->os_obj_next = object + dn_slots; /* + * The value of (*cpuobj) before adding dn_slots is the object + * ID assigned to us. The value afterwards is the object ID + * assigned to whoever wants to do an allocation next. + */ + object = atomic_add_64_nv(cpuobj, dn_slots) - dn_slots; + + /* * XXX We should check for an i/o error here and return * up to our caller. Actually we should pre-read it in * dmu_tx_assign(), but there is currently no mechanism * to do so. */ - (void) dnode_hold_impl(os, object, DNODE_MUST_BE_FREE, dn_slots, - FTAG, &dn); - if (dn) - break; - - if (dmu_object_next(os, &object, B_TRUE, 0) == 0) - os->os_obj_next = object; - else + error = dnode_hold_impl(os, object, DNODE_MUST_BE_FREE, + dn_slots, FTAG, &dn); + if (error == 0) { + rw_enter(&dn->dn_struct_rwlock, RW_WRITER); /* - * Skip to next known valid starting point for a dnode. + * Another thread could have allocated it; check + * again now that we have the struct lock. */ - os->os_obj_next = P2ROUNDUP(object + 1, - DNODES_PER_BLOCK); - } + if (dn->dn_type == DMU_OT_NONE) { + dnode_allocate(dn, ot, blocksize, 0, + bonustype, bonuslen, dn_slots, tx); + rw_exit(&dn->dn_struct_rwlock); + dmu_tx_add_new_object(tx, dn); + dnode_rele(dn, FTAG); + return (object); + } + rw_exit(&dn->dn_struct_rwlock); + dnode_rele(dn, FTAG); + DNODE_STAT_BUMP(dnode_alloc_race); + } - dnode_allocate(dn, ot, blocksize, indirect_blockshift, - bonustype, bonuslen, dn_slots, tx); - mutex_exit(&os->os_obj_lock); - - dmu_tx_add_new_object(tx, dn); - dnode_rele(dn, FTAG); - - return (object); + /* + * Skip to next known valid starting point on error. This + * is the start of the next block of dnodes. + */ + if (dmu_object_next(os, &object, B_TRUE, 0) != 0) { + object = P2ROUNDUP(object + 1, DNODES_PER_BLOCK); + DNODE_STAT_BUMP(dnode_alloc_next_block); + } + (void) atomic_swap_64(cpuobj, object); + } } uint64_t dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { - return dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, - bonuslen, 0, tx); + return (dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, + bonuslen, 0, tx)); } uint64_t @@ -145,8 +209,8 @@ dmu_object_alloc_ibs(objset_t *os, dmu_object_type_t o int indirect_blockshift, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { - return dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, - bonustype, bonuslen, 0, tx); + return (dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, + bonustype, bonuslen, 0, tx)); } uint64_t @@ -178,7 +242,7 @@ dmu_object_claim_dnsize(objset_t *os, uint64_t object, dn_slots = DNODE_MIN_SLOTS; ASSERT3S(dn_slots, >=, DNODE_MIN_SLOTS); ASSERT3S(dn_slots, <=, DNODE_MAX_SLOTS); - + if (object == DMU_META_DNODE_OBJECT && !dmu_tx_private_ok(tx)) return (SET_ERROR(EBADF)); @@ -260,28 +324,52 @@ int dmu_object_next(objset_t *os, uint64_t *objectp, boolean_t hole, uint64_t txg) { uint64_t offset; - dmu_object_info_t doi; + uint64_t start_obj; struct dsl_dataset *ds = os->os_dsl_dataset; - int dnodesize; int error; - /* - * Avoid expensive dnode hold if this dataset doesn't use large dnodes. - */ - if (ds && ds->ds_feature_inuse[SPA_FEATURE_LARGE_DNODE]) { - error = dmu_object_info(os, *objectp, &doi); - if (error && !(error == EINVAL && *objectp == 0)) - return (SET_ERROR(error)); - else - dnodesize = doi.doi_dnodesize; + if (*objectp == 0) { + start_obj = 1; + } else if (ds && ds->ds_feature_inuse[SPA_FEATURE_LARGE_DNODE]) { + uint64_t i = *objectp + 1; + uint64_t last_obj = *objectp | (DNODES_PER_BLOCK - 1); + dmu_object_info_t doi; + + /* + * Scan through the remaining meta dnode block. The contents + * of each slot in the block are known so it can be quickly + * checked. If the block is exhausted without a match then + * hand off to dnode_next_offset() for further scanning. + */ + while (i <= last_obj) { + error = dmu_object_info(os, i, &doi); + if (error == ENOENT) { + if (hole) { + *objectp = i; + return (0); + } else { + i++; + } + } else if (error == EEXIST) { + i++; + } else if (error == 0) { + if (hole) { + i += doi.doi_dnodesize >> DNODE_SHIFT; + } else { + *objectp = i; + return (0); + } + } else { + return (error); + } + } + + start_obj = i; } else { - dnodesize = DNODE_MIN_SIZE; + start_obj = *objectp + 1; } - if (*objectp == 0) - offset = 1 << DNODE_SHIFT; - else - offset = (*objectp << DNODE_SHIFT) + dnodesize; + offset = start_obj << DNODE_SHIFT; error = dnode_next_offset(DMU_META_DNODE(os), (hole ? DNODE_FIND_HOLE : 0), &offset, 0, DNODES_PER_BLOCK, txg); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Aug 15 14:57:27 2019 (r351074) @@ -566,6 +566,9 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, bl mutex_init(&os->os_userused_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_obj_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_user_ptr_lock, NULL, MUTEX_DEFAULT, NULL); + os->os_obj_next_percpu_len = boot_ncpus; + os->os_obj_next_percpu = kmem_zalloc(os->os_obj_next_percpu_len * + sizeof (os->os_obj_next_percpu[0]), KM_SLEEP); dnode_special_open(os, &os->os_phys->os_meta_dnode, DMU_META_DNODE_OBJECT, &os->os_meta_dnode); @@ -843,6 +846,9 @@ dmu_objset_evict_done(objset_t *os) */ rw_enter(&os_lock, RW_READER); rw_exit(&os_lock); + + kmem_free(os->os_obj_next_percpu, + os->os_obj_next_percpu_len * sizeof (os->os_obj_next_percpu[0])); mutex_destroy(&os->os_lock); mutex_destroy(&os->os_userused_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Aug 15 14:57:27 2019 (r351074) @@ -1437,17 +1437,12 @@ dmu_recv_begin_check(void *arg, dmu_tx_t *tx) /* * The receiving code doesn't know how to translate large blocks * to smaller ones, so the pool must have the LARGE_BLOCKS - * feature enabled if the stream has LARGE_BLOCKS. + * feature enabled if the stream has LARGE_BLOCKS. Same with + * large dnodes. */ if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) return (SET_ERROR(ENOTSUP)); - - /* - * The receiving code doesn't know how to translate large dnodes - * to smaller ones, so the pool must have the LARGE_DNODE - * feature enabled if the stream has LARGE_DNODE. - */ if ((featureflags & DMU_BACKUP_FEATURE_LARGE_DNODE) && !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_DNODE)) return (SET_ERROR(ENOTSUP)); @@ -1655,6 +1650,9 @@ dmu_recv_resume_begin_check(void *arg, dmu_tx_t *tx) dsl_dataset_t *ds; const char *tofs = drba->drba_cookie->drc_tofs; + /* 6 extra bytes for /%recv */ + char recvname[ZFS_MAX_DATASET_NAME_LEN + 6]; + /* already checked */ ASSERT3U(drrb->drr_magic, ==, DMU_BACKUP_MAGIC); ASSERT(featureflags & DMU_BACKUP_FEATURE_RESUMING); @@ -1682,8 +1680,18 @@ dmu_recv_resume_begin_check(void *arg, dmu_tx_t *tx) !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) return (SET_ERROR(ENOTSUP)); - /* 6 extra bytes for /%recv */ - char recvname[ZFS_MAX_DATASET_NAME_LEN + 6]; + /* + * The receiving code doesn't know how to translate large blocks + * to smaller ones, so the pool must have the LARGE_BLOCKS + * feature enabled if the stream has LARGE_BLOCKS. Same with + * large dnodes. + */ + if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && + !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) + return (SET_ERROR(ENOTSUP)); + if ((featureflags & DMU_BACKUP_FEATURE_LARGE_DNODE) && + !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_DNODE)) + return (SET_ERROR(ENOTSUP)); (void) snprintf(recvname, sizeof (recvname), "%s/%s", tofs, recv_clone_name); @@ -2155,15 +2163,16 @@ receive_object(struct receive_writer_arg *rwa, struct drro->drr_blksz < SPA_MINBLOCKSIZE || drro->drr_blksz > spa_maxblocksize(dmu_objset_spa(rwa->os)) || drro->drr_bonuslen > - DN_BONUS_SIZE(spa_maxdnodesize(dmu_objset_spa(rwa->os)))) { + DN_BONUS_SIZE(spa_maxdnodesize(dmu_objset_spa(rwa->os))) || + drro->drr_dn_slots > + (spa_maxdnodesize(dmu_objset_spa(rwa->os)) >> DNODE_SHIFT)) { return (SET_ERROR(EINVAL)); } err = dmu_object_info(rwa->os, drro->drr_object, &doi); - if (err != 0 && err != ENOENT) + if (err != 0 && err != ENOENT && err != EEXIST) return (SET_ERROR(EINVAL)); - object = err == 0 ? drro->drr_object : DMU_NEW_OBJECT; if (drro->drr_object > rwa->max_object) rwa->max_object = drro->drr_object; @@ -2176,18 +2185,66 @@ receive_object(struct receive_writer_arg *rwa, struct if (err == 0) { int nblkptr; + object = drro->drr_object; + nblkptr = deduce_nblkptr(drro->drr_bonustype, drro->drr_bonuslen); if (drro->drr_blksz != doi.doi_data_block_size || - nblkptr < doi.doi_nblkptr) { + nblkptr < doi.doi_nblkptr || + drro->drr_dn_slots != doi.doi_dnodesize >> DNODE_SHIFT) { err = dmu_free_long_range(rwa->os, drro->drr_object, 0, DMU_OBJECT_END); if (err != 0) return (SET_ERROR(EINVAL)); } + } else if (err == EEXIST) { + /* + * The object requested is currently an interior slot of a + * multi-slot dnode. This will be resolved when the next txg + * is synced out, since the send stream will have told us + * to free this slot when we freed the associated dnode + * earlier in the stream. + */ + txg_wait_synced(dmu_objset_pool(rwa->os), 0); + object = drro->drr_object; + } else { + /* object is free and we are about to allocate a new one */ + object = DMU_NEW_OBJECT; } + /* + * If this is a multi-slot dnode there is a chance that this + * object will expand into a slot that is already used by + * another object from the previous snapshot. We must free + * these objects before we attempt to allocate the new dnode. + */ + if (drro->drr_dn_slots > 1) { + boolean_t need_sync = B_FALSE; + + for (uint64_t slot = drro->drr_object + 1; + slot < drro->drr_object + drro->drr_dn_slots; + slot++) { + dmu_object_info_t slot_doi; + + err = dmu_object_info(rwa->os, slot, &slot_doi); + if (err == ENOENT || err == EEXIST) + continue; + else if (err != 0) + return (err); + + err = dmu_free_long_object(rwa->os, slot); + + if (err != 0) + return (err); + + need_sync = B_TRUE; + } + + if (need_sync) + txg_wait_synced(dmu_objset_pool(rwa->os), 0); + } + tx = dmu_tx_create(rwa->os); dmu_tx_hold_bonus(tx, object); err = dmu_tx_assign(tx, TXG_WAIT); @@ -2259,10 +2316,10 @@ receive_freeobjects(struct receive_writer_arg *rwa, dmu_object_info_t doi; int err; - err = dmu_object_info(rwa->os, obj, &doi); + err = dmu_object_info(rwa->os, obj, NULL); if (err == ENOENT) { obj++; - continue; + continue; } else if (err != 0) { return (err); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Aug 15 14:57:27 2019 (r351074) @@ -1252,11 +1252,13 @@ dmu_tx_sa_registration_hold(sa_os_t *sa, dmu_tx_t *tx) void dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t object) { - dmu_tx_hold_t *txh = dmu_tx_hold_object_impl(tx, - tx->tx_objset, object, THT_SPILL, 0, 0); + dmu_tx_hold_t *txh; - (void) refcount_add_many(&txh->txh_space_towrite, - SPA_OLD_MAXBLOCKSIZE, FTAG); + txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, + THT_SPILL, 0, 0); + if (txh != NULL) + (void) refcount_add_many(&txh->txh_space_towrite, + SPA_OLD_MAXBLOCKSIZE, FTAG); } void Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Aug 15 14:54:18 2019 (r351073) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Aug 15 14:57:27 2019 (r351074) @@ -40,21 +40,41 @@ #include #include +dnode_stats_t dnode_stats = { + { "dnode_hold_dbuf_hold", KSTAT_DATA_UINT64 }, + { "dnode_hold_dbuf_read", KSTAT_DATA_UINT64 }, + { "dnode_hold_alloc_hits", KSTAT_DATA_UINT64 }, + { "dnode_hold_alloc_misses", KSTAT_DATA_UINT64 }, + { "dnode_hold_alloc_interior", KSTAT_DATA_UINT64 }, + { "dnode_hold_alloc_lock_retry", KSTAT_DATA_UINT64 }, + { "dnode_hold_alloc_lock_misses", KSTAT_DATA_UINT64 }, + { "dnode_hold_alloc_type_none", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_hits", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_misses", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_lock_misses", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_lock_retry", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_overflow", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_refcount", KSTAT_DATA_UINT64 }, + { "dnode_hold_free_txg", KSTAT_DATA_UINT64 }, + { "dnode_free_interior_lock_retry", KSTAT_DATA_UINT64 }, + { "dnode_allocate", KSTAT_DATA_UINT64 }, + { "dnode_reallocate", KSTAT_DATA_UINT64 }, + { "dnode_buf_evict", KSTAT_DATA_UINT64 }, + { "dnode_alloc_next_chunk", KSTAT_DATA_UINT64 }, + { "dnode_alloc_race", KSTAT_DATA_UINT64 }, + { "dnode_alloc_next_block", KSTAT_DATA_UINT64 }, + { "dnode_move_invalid", KSTAT_DATA_UINT64 }, + { "dnode_move_recheck1", KSTAT_DATA_UINT64 }, + { "dnode_move_recheck2", KSTAT_DATA_UINT64 }, + { "dnode_move_special", KSTAT_DATA_UINT64 }, + { "dnode_move_handle", KSTAT_DATA_UINT64 }, + { "dnode_move_rwlock", KSTAT_DATA_UINT64 }, + { "dnode_move_active", KSTAT_DATA_UINT64 }, +}; + +static kstat_t *dnode_ksp; static kmem_cache_t *dnode_cache; -/* - * Define DNODE_STATS to turn on statistic gathering. By default, it is only - * turned on when DEBUG is also defined. - */ -#ifdef DEBUG -#define DNODE_STATS -#endif /* DEBUG */ -#ifdef DNODE_STATS -#define DNODE_STAT_ADD(stat) ((stat)++) -#else -#define DNODE_STAT_ADD(stat) /* nothing */ -#endif /* DNODE_STATS */ - static dnode_phys_t dnode_phys_zero; int zfs_default_bs = SPA_MINBLOCKSHIFT; @@ -215,12 +235,25 @@ dnode_init(void) 0, dnode_cons, dnode_dest, NULL, NULL, NULL, 0); #ifdef _KERNEL kmem_cache_set_move(dnode_cache, dnode_move); + + dnode_ksp = kstat_create("zfs", 0, "dnodestats", "misc", + KSTAT_TYPE_NAMED, sizeof (dnode_stats) / sizeof (kstat_named_t), + KSTAT_FLAG_VIRTUAL); + if (dnode_ksp != NULL) { + dnode_ksp->ks_data = &dnode_stats; + kstat_install(dnode_ksp); + } #endif /* _KERNEL */ } void dnode_fini(void) { + if (dnode_ksp != NULL) { + kstat_delete(dnode_ksp); + dnode_ksp = NULL; + } + kmem_cache_destroy(dnode_cache); dnode_cache = NULL; } @@ -333,6 +366,7 @@ dnode_byteswap(dnode_phys_t *dnp) /* Swap SPILL block if we have one */ if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) byteswap_uint64_array(DN_SPILL_BLKPTR(dnp), sizeof (blkptr_t)); + } void @@ -344,7 +378,7 @@ dnode_buf_byteswap(void *vbuf, size_t size) ASSERT((size & (sizeof (dnode_phys_t)-1)) == 0); while (i < size) { - dnode_phys_t *dnp = vbuf + i; + dnode_phys_t *dnp = (void *)(((char *)vbuf) + i); dnode_byteswap(dnp); i += DNODE_MIN_SIZE; @@ -448,14 +482,10 @@ dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_ dmu_zfetch_init(&dn->dn_zfetch, dn); ASSERT(DMU_OT_IS_VALID(dn->dn_phys->dn_type)); + ASSERT(zrl_is_locked(&dnh->dnh_zrlock)); + ASSERT(!DN_SLOT_IS_PTR(dnh->dnh_dnode)); mutex_enter(&os->os_lock); - if (dnh->dnh_dnode != NULL) { - /* Lost the allocation race. */ - mutex_exit(&os->os_lock); - kmem_cache_free(dnode_cache, dn); - return (dnh->dnh_dnode); - } /* * Exclude special dnodes from os_dnodes so an empty os_dnodes @@ -478,6 +508,7 @@ dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_ mutex_exit(&os->os_lock); arc_space_consume(sizeof (dnode_t), ARC_SPACE_DNODE); + return (dn); } @@ -503,7 +534,8 @@ dnode_destroy(dnode_t *dn) mutex_exit(&os->os_lock); /* the dnode can no longer move, so we can release the handle */ - zrl_remove(&dn->dn_handle->dnh_zrlock); + if (!zrl_is_locked(&dn->dn_handle->dnh_zrlock)) + zrl_remove(&dn->dn_handle->dnh_zrlock); dn->dn_allocated_txg = 0; dn->dn_free_txg = 0; @@ -559,8 +591,10 @@ dnode_allocate(dnode_t *dn, dmu_object_type_t ot, int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Aug 15 15:11:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6BBCAC264; Thu, 15 Aug 2019 15:11:21 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468VK549TRz3xbM; Thu, 15 Aug 2019 15:11:21 +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 70D971A67B; Thu, 15 Aug 2019 15:11:21 +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 x7FFBL8g046739; Thu, 15 Aug 2019 15:11:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FFBLZ4046737; Thu, 15 Aug 2019 15:11:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908151511.x7FFBLZ4046737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Aug 2019 15:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351076 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 351076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 15:11:21 -0000 Author: avg Date: Thu Aug 15 15:11:20 2019 New Revision: 351076 URL: https://svnweb.freebsd.org/changeset/base/351076 Log: MFV r351075: 10406 large_dnode changes broke zfs recv of legacy stream illumos/illumos-gate@811964cd9f1fbae0fc3b93d116269e9b1fca090a https://github.com/illumos/illumos-gate/commit/811964cd9f1fbae0fc3b93d116269e9b1fca090a https://www.illumos.org/issues/10406 The large dnode changes from 8423 caused problems in zfs recv for a legacy stream. This manifests when attempting to mount the received stream, but the problem is in the receive code. We missed the following commit from ZoL which fixes this. commit da2feb42fb5c7a8c1e1cc67f7a880da9d8e97bc2 Author: Tom Caputi Date: Thu Jun 28 17:55:11 2018 -0400 Fix 'zfs recv' of non large_dnode send streams Currently, there is a bug where older send streams without the DMU_BACKUP_FEATURE_LARGE_DNODE flag are not handled correctly. The code in receive_object() fails to handle cases where drro->drr_dn_slots is set to 0, which is always the case when the sending code does not support this feature flag. This patch fixes the issue by ensuring that that a value of 0 is treated as DNODE_MIN_SLOTS. Author: Tom Caputi MFC after: 3 weeks X-MFC after: r351074 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Thu Aug 15 15:07:17 2019 (r351075) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Thu Aug 15 15:11:20 2019 (r351076) @@ -275,6 +275,9 @@ dmu_object_reclaim_dnsize(objset_t *os, uint64_t objec int dn_slots = dnodesize >> DNODE_SHIFT; int err; + if (dn_slots == 0) + dn_slots = DNODE_MIN_SLOTS; + if (object == DMU_META_DNODE_OBJECT) return (SET_ERROR(EBADF)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Aug 15 15:07:17 2019 (r351075) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Aug 15 15:11:20 2019 (r351076) @@ -2153,6 +2153,8 @@ receive_object(struct receive_writer_arg *rwa, struct dmu_tx_t *tx; uint64_t object; int err; + uint8_t dn_slots = drro->drr_dn_slots != 0 ? + drro->drr_dn_slots : DNODE_MIN_SLOTS; if (drro->drr_type == DMU_OT_NONE || !DMU_OT_IS_VALID(drro->drr_type) || @@ -2164,7 +2166,7 @@ receive_object(struct receive_writer_arg *rwa, struct drro->drr_blksz > spa_maxblocksize(dmu_objset_spa(rwa->os)) || drro->drr_bonuslen > DN_BONUS_SIZE(spa_maxdnodesize(dmu_objset_spa(rwa->os))) || - drro->drr_dn_slots > + dn_slots > (spa_maxdnodesize(dmu_objset_spa(rwa->os)) >> DNODE_SHIFT)) { return (SET_ERROR(EINVAL)); } @@ -2192,7 +2194,7 @@ receive_object(struct receive_writer_arg *rwa, struct if (drro->drr_blksz != doi.doi_data_block_size || nblkptr < doi.doi_nblkptr || - drro->drr_dn_slots != doi.doi_dnodesize >> DNODE_SHIFT) { + dn_slots != doi.doi_dnodesize >> DNODE_SHIFT) { err = dmu_free_long_range(rwa->os, drro->drr_object, 0, DMU_OBJECT_END); if (err != 0) @@ -2219,11 +2221,11 @@ receive_object(struct receive_writer_arg *rwa, struct * another object from the previous snapshot. We must free * these objects before we attempt to allocate the new dnode. */ - if (drro->drr_dn_slots > 1) { + if (dn_slots > 1) { boolean_t need_sync = B_FALSE; for (uint64_t slot = drro->drr_object + 1; - slot < drro->drr_object + drro->drr_dn_slots; + slot < drro->drr_object + dn_slots; slot++) { dmu_object_info_t slot_doi; @@ -2258,7 +2260,7 @@ receive_object(struct receive_writer_arg *rwa, struct err = dmu_object_claim_dnsize(rwa->os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen, - drro->drr_dn_slots << DNODE_SHIFT, tx); + dn_slots << DNODE_SHIFT, tx); } else if (drro->drr_type != doi.doi_type || drro->drr_blksz != doi.doi_data_block_size || drro->drr_bonustype != doi.doi_bonus_type || From owner-svn-src-head@freebsd.org Thu Aug 15 15:28:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31D09AC768; Thu, 15 Aug 2019 15:28:01 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468VhK162Wz3yQ3; Thu, 15 Aug 2019 15:28:01 +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 00D021A8C0; Thu, 15 Aug 2019 15:28:00 +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 x7FFS0To056446; Thu, 15 Aug 2019 15:28:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FFRwdd056431; Thu, 15 Aug 2019 15:27:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908151527.x7FFRwdd056431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Aug 2019 15:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351077 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/... X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs... X-SVN-Commit-Revision: 351077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 15:28:01 -0000 Author: avg Date: Thu Aug 15 15:27:58 2019 New Revision: 351077 URL: https://svnweb.freebsd.org/changeset/base/351077 Log: Revert r351076 and r351074 because of atomic_swap_64 on 32-bit platforms Trying to sort it out. Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/sa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Aug 15 15:27:58 2019 (r351077) @@ -2134,8 +2134,7 @@ static object_viewer_t *object_viewer[DMU_OT_NUMTYPES }; static void -dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header, - uint64_t *dnode_slots_used) +dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header) { dmu_buf_t *db = NULL; dmu_object_info_t doi; @@ -2155,7 +2154,7 @@ dump_object(objset_t *os, uint64_t object, int verbosi CTASSERT(sizeof (bonus_size) >= NN_NUMBUF_SZ); if (*print_header) { - (void) printf("\n%10s %3s %5s %5s %5s %6s %5s %6s %s\n", + (void) printf("\n%10s %3s %5s %5s %5s %6s %5s %6s %s\n", "Object", "lvl", "iblk", "dblk", "dsize", "dnsize", "lsize", "%full", "type"); *print_header = 0; @@ -2174,9 +2173,6 @@ dump_object(objset_t *os, uint64_t object, int verbosi } dmu_object_info_from_dnode(dn, &doi); - if (dnode_slots_used != NULL) - *dnode_slots_used = doi.doi_dnodesize / DNODE_MIN_SIZE; - zdb_nicenum(doi.doi_metadata_block_size, iblk, sizeof (iblk)); zdb_nicenum(doi.doi_data_block_size, dblk, sizeof (dblk)); zdb_nicenum(doi.doi_max_offset, lsize, sizeof (lsize)); @@ -2199,9 +2195,8 @@ dump_object(objset_t *os, uint64_t object, int verbosi ZDB_COMPRESS_NAME(doi.doi_compress)); } - (void) printf("%10" PRIu64 - " %3u %5s %5s %5s %5s %5s %6s %s%s\n", - object, doi.doi_indirection, iblk, dblk, + (void) printf("%10lld %3u %5s %5s %5s %6s %5s %6s %s%s\n", + (u_longlong_t)object, doi.doi_indirection, iblk, dblk, asize, dnsize, lsize, fill, ZDB_OT_NAME(doi.doi_type), aux); if (doi.doi_bonus_type != DMU_OT_NONE && verbosity > 3) { @@ -2310,9 +2305,6 @@ dump_dir(objset_t *os) int print_header = 1; unsigned i; int error; - uint64_t total_slots_used = 0; - uint64_t max_slot_used = 0; - uint64_t dnode_slots; /* make sure nicenum has enough space */ CTASSERT(sizeof (numbuf) >= NN_NUMBUF_SZ); @@ -2357,7 +2349,7 @@ dump_dir(objset_t *os) if (zopt_objects != 0) { for (i = 0; i < zopt_objects; i++) dump_object(os, zopt_object[i], verbosity, - &print_header, NULL); + &print_header); (void) printf("\n"); return; } @@ -2382,37 +2374,22 @@ dump_dir(objset_t *os) if (BP_IS_HOLE(os->os_rootbp)) return; - dump_object(os, 0, verbosity, &print_header, NULL); + dump_object(os, 0, verbosity, &print_header); object_count = 0; if (DMU_USERUSED_DNODE(os) != NULL && DMU_USERUSED_DNODE(os)->dn_type != 0) { - dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header, - NULL); - dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header, - NULL); + dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header); + dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header); } object = 0; while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) { - dump_object(os, object, verbosity, &print_header, &dnode_slots); + dump_object(os, object, verbosity, &print_header); object_count++; - total_slots_used += dnode_slots; - max_slot_used = object + dnode_slots - 1; } (void) printf("\n"); - (void) printf(" Dnode slots:\n"); - (void) printf("\tTotal used: %10llu\n", - (u_longlong_t)total_slots_used); - (void) printf("\tMax used: %10llu\n", - (u_longlong_t)max_slot_used); - (void) printf("\tPercent empty: %10lf\n", - (double)(max_slot_used - total_slots_used)*100 / - (double)max_slot_used); - - (void) printf("\n"); - if (error != ESRCH) { (void) fprintf(stderr, "dmu_object_next() = %d\n", error); abort(); @@ -2604,7 +2581,7 @@ dump_path_impl(objset_t *os, uint64_t obj, char *name) return (dump_path_impl(os, child_obj, s + 1)); /*FALLTHROUGH*/ case DMU_OT_PLAIN_FILE_CONTENTS: - dump_object(os, child_obj, dump_opt['v'], &header, NULL); + dump_object(os, child_obj, dump_opt['v'], &header); return (0); default: (void) fprintf(stderr, "object %llu has non-file/directory " Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Thu Aug 15 15:27:58 2019 (r351077) @@ -84,15 +84,15 @@ zil_prt_rec_create(zilog_t *zilog, int txtype, void *a } (void) printf("%s%s", tab_prefix, ctime(&crtime)); - (void) printf("%sdoid %" PRIu64 ", foid %" PRIu64 ", slots %" PRIu64 - ", mode %" PRIo64 "\n", - tab_prefix, lr->lr_doid, - (uint64_t)LR_FOID_GET_OBJ(lr->lr_foid), - (uint64_t)LR_FOID_GET_SLOTS(lr->lr_foid), - lr->lr_mode); - (void) printf("%suid %" PRIu64 ", gid %" PRIu64 ", gen %" PRIu64 - ", rdev %#" PRIx64 "\n", - tab_prefix, lr->lr_uid, lr->lr_gid, lr->lr_gen, lr->lr_rdev); + (void) printf("%sdoid %llu, foid %llu, slots %llu, mode %llo\n", tab_prefix, + (u_longlong_t)lr->lr_doid, + (u_longlong_t)LR_FOID_GET_OBJ(lr->lr_foid), + (u_longlong_t)LR_FOID_GET_SLOTS(lr->lr_foid), + (longlong_t)lr->lr_mode); + (void) printf("%suid %llu, gid %llu, gen %llu, rdev 0x%llx\n", + tab_prefix, + (u_longlong_t)lr->lr_uid, (u_longlong_t)lr->lr_gid, + (u_longlong_t)lr->lr_gen, (u_longlong_t)lr->lr_rdev); } /* ARGSUSED */ Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Thu Aug 15 15:27:58 2019 (r351077) @@ -416,15 +416,13 @@ main(int argc, char *argv[]) drro->drr_toguid = BSWAP_64(drro->drr_toguid); } if (verbose) { - (void) printf("OBJECT object = %" PRIu64 - " type = %u bonustype = %u blksz = %u" - " bonuslen = %u dn_slots = %u\n", - drro->drr_object, + (void) printf("OBJECT object = %llu type = %u " + "bonustype = %u blksz = %u bonuslen = %u\n", + (u_longlong_t)drro->drr_object, drro->drr_type, drro->drr_bonustype, drro->drr_blksz, - drro->drr_bonuslen, - drro->drr_dn_slots); + drro->drr_bonuslen); } if (drro->drr_bonuslen > 0) { (void) ssread(buf, Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 15 15:27:58 2019 (r351077) @@ -196,7 +196,6 @@ extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; extern boolean_t zfs_compressed_arc_enabled; extern boolean_t zfs_abd_scatter_enabled; -extern int dmu_object_alloc_chunk_shift; extern boolean_t zfs_force_some_double_word_sm_entries; static ztest_shared_opts_t *ztest_shared_opts; @@ -323,7 +322,6 @@ static ztest_shared_callstate_t *ztest_shared_callstat ztest_func_t ztest_dmu_read_write; ztest_func_t ztest_dmu_write_parallel; ztest_func_t ztest_dmu_object_alloc_free; -ztest_func_t ztest_dmu_object_next_chunk; ztest_func_t ztest_dmu_commit_callbacks; ztest_func_t ztest_zap; ztest_func_t ztest_zap_parallel; @@ -365,7 +363,6 @@ ztest_info_t ztest_info[] = { { ztest_dmu_read_write, 1, &zopt_always }, { ztest_dmu_write_parallel, 10, &zopt_always }, { ztest_dmu_object_alloc_free, 1, &zopt_always }, - { ztest_dmu_object_next_chunk, 1, &zopt_sometimes }, { ztest_dmu_commit_callbacks, 1, &zopt_always }, { ztest_zap, 30, &zopt_always }, { ztest_zap_parallel, 100, &zopt_always }, @@ -1369,7 +1366,7 @@ ztest_bt_bonus(dmu_buf_t *db) * it unique to the object, generation, and offset to verify that data * is not getting overwritten by data from other dnodes. */ -#define ZTEST_BONUS_FILL_TOKEN(obj, ds, gen, offset) \ +#define ZTEST_BONUS_FILL_TOKEN(obj, ds, gen, offset) \ (((ds) << 48) | ((gen) << 32) | ((obj) << 8) | (offset)) /* @@ -1898,7 +1895,6 @@ ztest_replay_setattr(void *arg1, void *arg2, boolean_t ztest_bt_generate(bbt, os, lr->lr_foid, dnodesize, -1ULL, lr->lr_mode, txg, crtxg); ztest_fill_unused_bonus(db, bbt, lr->lr_foid, os, bbt->bt_gen); - dmu_buf_rele(db, FTAG); (void) ztest_log_setattr(zd, tx, lr); @@ -3819,10 +3815,8 @@ ztest_dmu_object_alloc_free(ztest_ds_t *zd, uint64_t i ztest_od_t od[4]; int batchsize = sizeof (od) / sizeof (od[0]); - for (int b = 0; b < batchsize; b++) { - ztest_od_init(&od[b], id, FTAG, b, DMU_OT_UINT64_OTHER, - 0, 0, 0); - } + for (int b = 0; b < batchsize; b++) + ztest_od_init(&od[b], id, FTAG, b, DMU_OT_UINT64_OTHER, 0, 0, 0); /* * Destroy the previous batch of objects, create a new batch, @@ -3837,26 +3831,6 @@ ztest_dmu_object_alloc_free(ztest_ds_t *zd, uint64_t i } /* - * Rewind the global allocator to verify object allocation backfilling. - */ -void -ztest_dmu_object_next_chunk(ztest_ds_t *zd, uint64_t id) -{ - objset_t *os = zd->zd_os; - int dnodes_per_chunk = 1 << dmu_object_alloc_chunk_shift; - uint64_t object; - - /* - * Rewind the global allocator randomly back to a lower object number - * to force backfilling and reclamation of recently freed dnodes. - */ - mutex_enter(&os->os_obj_lock); - object = ztest_random(os->os_obj_next_chunk); - os->os_obj_next_chunk = P2ALIGN(object, dnodes_per_chunk); - mutex_exit(&os->os_obj_lock); -} - -/* * Verify that dmu_{read,write} work as expected. */ void @@ -3902,10 +3876,8 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id) /* * Read the directory info. If it's the first time, set things up. */ - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, - chunksize); - ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, - chunksize); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, chunksize); + ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, chunksize); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -4174,10 +4146,8 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *zd, uint64_t id /* * Read the directory info. If it's the first time, set things up. */ - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, - 0, 0); - ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, - chunksize); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); + ztest_od_init(&od[1], id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, chunksize); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -4377,8 +4347,7 @@ ztest_dmu_write_parallel(ztest_ds_t *zd, uint64_t id) * to verify that parallel writes to an object -- even to the * same blocks within the object -- doesn't cause any trouble. */ - ztest_od_init(&od[0], ID_PARALLEL, FTAG, 0, DMU_OT_UINT64_OTHER, - 0, 0, 0); + ztest_od_init(&od[0], ID_PARALLEL, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, 0); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -4397,8 +4366,7 @@ ztest_dmu_prealloc(ztest_ds_t *zd, uint64_t id) uint64_t blocksize = ztest_random_blocksize(); void *data; - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, - 0, 0); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) return; @@ -4622,8 +4590,7 @@ ztest_zap_parallel(ztest_ds_t *zd, uint64_t id) char name[20], string_value[20]; void *data; - ztest_od_init(&od[0], ID_PARALLEL, FTAG, micro, DMU_OT_ZAP_OTHER, - 0, 0, 0); + ztest_od_init(&od[0], ID_PARALLEL, FTAG, micro, DMU_OT_ZAP_OTHER, 0, 0, 0); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; @@ -5444,8 +5411,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id) blocksize = ztest_random_blocksize(); blocksize = MIN(blocksize, 2048); /* because we write so many */ - ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, - 0, 0); + ztest_od_init(&od[0], id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); if (ztest_object_init(zd, od, sizeof (od), B_FALSE) != 0) return; Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Thu Aug 15 15:27:58 2019 (r351077) @@ -292,11 +292,10 @@ zfs_prop_init(void) ZFS_VOLMODE_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT | ZFS_TYPE_VOLUME, "default | geom | dev | none", "VOLMODE", volmode_table); - zprop_register_index(ZFS_PROP_DNODESIZE, "dnodesize", ZFS_DNSIZE_LEGACY, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "legacy | auto | 1k | 2k | 4k | 8k | 16k", "DNSIZE", dnsize_table); - + /* inherit index (boolean) properties */ zprop_register_index(ZFS_PROP_ATIME, "atime", 1, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "on | off", "ATIME", boolean_table); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Aug 15 15:27:58 2019 (r351077) @@ -3757,8 +3757,7 @@ dbuf_write_ready(zio_t *zio, arc_buf_t *buf, void *vdb if (dn->dn_type == DMU_OT_DNODE) { i = 0; while (i < db->db.db_size) { - dnode_phys_t *dnp = - (void *)(((char *)db->db.db_data) + i); + dnode_phys_t *dnp = db->db.db_data + i; i += DNODE_MIN_SIZE; if (dnp->dn_type != DMU_OT_NONE) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Thu Aug 15 15:27:58 2019 (r351077) @@ -32,14 +32,6 @@ #include #include -/* - * Each of the concurrent object allocators will grab - * 2^dmu_object_alloc_chunk_shift dnode slots at a time. The default is to - * grab 128 slots, which is 4 blocks worth. This was experimentally - * determined to be the lowest value that eliminates the measurable effect - * of lock contention from this code path. - */ -int dmu_object_alloc_chunk_shift = 7; static uint64_t dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ot, int blocksize, @@ -52,10 +44,6 @@ dmu_object_alloc_impl(objset_t *os, dmu_object_type_t dnode_t *dn = NULL; int dn_slots = dnodesize >> DNODE_SHIFT; boolean_t restarted = B_FALSE; - uint64_t *cpuobj = &os->os_obj_next_percpu[CPU_SEQID % - os->os_obj_next_percpu_len]; - int dnodes_per_chunk = 1 << dmu_object_alloc_chunk_shift; - int error; if (dn_slots == 0) { dn_slots = DNODE_MIN_SLOTS; @@ -63,145 +51,93 @@ dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ASSERT3S(dn_slots, >=, DNODE_MIN_SLOTS); ASSERT3S(dn_slots, <=, DNODE_MAX_SLOTS); } - - /* - * The "chunk" of dnodes that is assigned to a CPU-specific - * allocator needs to be at least one block's worth, to avoid - * lock contention on the dbuf. It can be at most one L1 block's - * worth, so that the "rescan after polishing off a L1's worth" - * logic below will be sure to kick in. - */ - if (dnodes_per_chunk < DNODES_PER_BLOCK) - dnodes_per_chunk = DNODES_PER_BLOCK; - if (dnodes_per_chunk > L1_dnode_count) - dnodes_per_chunk = L1_dnode_count; - - object = *cpuobj; - + + mutex_enter(&os->os_obj_lock); for (;;) { + object = os->os_obj_next; /* - * If we finished a chunk of dnodes, get a new one from - * the global allocator. + * Each time we polish off a L1 bp worth of dnodes (2^12 + * objects), move to another L1 bp that's still + * reasonably sparse (at most 1/4 full). Look from the + * beginning at most once per txg. If we still can't + * allocate from that L1 block, search for an empty L0 + * block, which will quickly skip to the end of the + * metadnode if the no nearby L0 blocks are empty. This + * fallback avoids a pathology where full dnode blocks + * containing large dnodes appear sparse because they + * have a low blk_fill, leading to many failed + * allocation attempts. In the long term a better + * mechanism to search for sparse metadnode regions, + * such as spacemaps, could be implemented. + * + * os_scan_dnodes is set during txg sync if enough objects + * have been freed since the previous rescan to justify + * backfilling again. + * + * Note that dmu_traverse depends on the behavior that we use + * multiple blocks of the dnode object before going back to + * reuse objects. Any change to this algorithm should preserve + * that property or find another solution to the issues + * described in traverse_visitbp. */ - if ((P2PHASE(object, dnodes_per_chunk) == 0) || - (P2PHASE(object + dn_slots - 1, dnodes_per_chunk) < - dn_slots)) { - DNODE_STAT_BUMP(dnode_alloc_next_chunk); - mutex_enter(&os->os_obj_lock); - ASSERT0(P2PHASE(os->os_obj_next_chunk, - dnodes_per_chunk)); - object = os->os_obj_next_chunk; - - /* - * Each time we polish off a L1 bp worth of dnodes - * (2^12 objects), move to another L1 bp that's - * still reasonably sparse (at most 1/4 full). Look - * from the beginning at most once per txg. If we - * still can't allocate from that L1 block, search - * for an empty L0 block, which will quickly skip - * to the end of the metadnode if the no nearby L0 - * blocks are empty. This fallback avoids a - * pathology where full dnode blocks containing - * large dnodes appear sparse because they have a - * low blk_fill, leading to many failed allocation - * attempts. In the long term a better mechanism to - * search for sparse metadnode regions, such as - * spacemaps, could be implemented. - * - * os_scan_dnodes is set during txg sync if enough - * objects have been freed since the previous - * rescan to justify backfilling again. - * - * Note that dmu_traverse depends on the behavior - * that we use multiple blocks of the dnode object - * before going back to reuse objects. Any change - * to this algorithm should preserve that property - * or find another solution to the issues described - * in traverse_visitbp. - */ - if (P2PHASE(object, L1_dnode_count) == 0) { - uint64_t offset; - uint64_t blkfill; - int minlvl; - if (os->os_rescan_dnodes) { - offset = 0; - os->os_rescan_dnodes = B_FALSE; - } else { - offset = object << DNODE_SHIFT; - } - blkfill = restarted ? 1 : DNODES_PER_BLOCK >> 2; - minlvl = restarted ? 1 : 2; - restarted = B_TRUE; - error = dnode_next_offset(DMU_META_DNODE(os), - DNODE_FIND_HOLE, &offset, minlvl, - blkfill, 0); - if (error == 0) { - object = offset >> DNODE_SHIFT; - } + if (P2PHASE(object, L1_dnode_count) == 0) { + uint64_t offset; + uint64_t blkfill; + int minlvl; + int error; + if (os->os_rescan_dnodes) { + offset = 0; + os->os_rescan_dnodes = B_FALSE; + } else { + offset = object << DNODE_SHIFT; } - /* - * Note: if "restarted", we may find a L0 that - * is not suitably aligned. - */ - os->os_obj_next_chunk = - P2ALIGN(object, dnodes_per_chunk) + - dnodes_per_chunk; - (void) atomic_swap_64(cpuobj, object); - mutex_exit(&os->os_obj_lock); + blkfill = restarted ? 1 : DNODES_PER_BLOCK >> 2; + minlvl = restarted ? 1 : 2; + restarted = B_TRUE; + error = dnode_next_offset(DMU_META_DNODE(os), + DNODE_FIND_HOLE, &offset, minlvl, blkfill, 0); + if (error == 0) + object = offset >> DNODE_SHIFT; } + os->os_obj_next = object + dn_slots; /* - * The value of (*cpuobj) before adding dn_slots is the object - * ID assigned to us. The value afterwards is the object ID - * assigned to whoever wants to do an allocation next. - */ - object = atomic_add_64_nv(cpuobj, dn_slots) - dn_slots; - - /* * XXX We should check for an i/o error here and return * up to our caller. Actually we should pre-read it in * dmu_tx_assign(), but there is currently no mechanism * to do so. */ - error = dnode_hold_impl(os, object, DNODE_MUST_BE_FREE, - dn_slots, FTAG, &dn); - if (error == 0) { - rw_enter(&dn->dn_struct_rwlock, RW_WRITER); + (void) dnode_hold_impl(os, object, DNODE_MUST_BE_FREE, dn_slots, + FTAG, &dn); + if (dn) + break; + + if (dmu_object_next(os, &object, B_TRUE, 0) == 0) + os->os_obj_next = object; + else /* - * Another thread could have allocated it; check - * again now that we have the struct lock. + * Skip to next known valid starting point for a dnode. */ - if (dn->dn_type == DMU_OT_NONE) { - dnode_allocate(dn, ot, blocksize, 0, - bonustype, bonuslen, dn_slots, tx); - rw_exit(&dn->dn_struct_rwlock); - dmu_tx_add_new_object(tx, dn); - dnode_rele(dn, FTAG); - return (object); - } - rw_exit(&dn->dn_struct_rwlock); - dnode_rele(dn, FTAG); - DNODE_STAT_BUMP(dnode_alloc_race); - } - - /* - * Skip to next known valid starting point on error. This - * is the start of the next block of dnodes. - */ - if (dmu_object_next(os, &object, B_TRUE, 0) != 0) { - object = P2ROUNDUP(object + 1, DNODES_PER_BLOCK); - DNODE_STAT_BUMP(dnode_alloc_next_block); - } - (void) atomic_swap_64(cpuobj, object); + os->os_obj_next = P2ROUNDUP(object + 1, + DNODES_PER_BLOCK); } + + dnode_allocate(dn, ot, blocksize, indirect_blockshift, + bonustype, bonuslen, dn_slots, tx); + mutex_exit(&os->os_obj_lock); + + dmu_tx_add_new_object(tx, dn); + dnode_rele(dn, FTAG); + + return (object); } uint64_t dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { - return (dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, - bonuslen, 0, tx)); + return dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, + bonuslen, 0, tx); } uint64_t @@ -209,8 +145,8 @@ dmu_object_alloc_ibs(objset_t *os, dmu_object_type_t o int indirect_blockshift, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { - return (dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, - bonustype, bonuslen, 0, tx)); + return dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, + bonustype, bonuslen, 0, tx); } uint64_t @@ -242,7 +178,7 @@ dmu_object_claim_dnsize(objset_t *os, uint64_t object, dn_slots = DNODE_MIN_SLOTS; ASSERT3S(dn_slots, >=, DNODE_MIN_SLOTS); ASSERT3S(dn_slots, <=, DNODE_MAX_SLOTS); - + if (object == DMU_META_DNODE_OBJECT && !dmu_tx_private_ok(tx)) return (SET_ERROR(EBADF)); @@ -275,9 +211,6 @@ dmu_object_reclaim_dnsize(objset_t *os, uint64_t objec int dn_slots = dnodesize >> DNODE_SHIFT; int err; - if (dn_slots == 0) - dn_slots = DNODE_MIN_SLOTS; - if (object == DMU_META_DNODE_OBJECT) return (SET_ERROR(EBADF)); @@ -327,52 +260,28 @@ int dmu_object_next(objset_t *os, uint64_t *objectp, boolean_t hole, uint64_t txg) { uint64_t offset; - uint64_t start_obj; + dmu_object_info_t doi; struct dsl_dataset *ds = os->os_dsl_dataset; + int dnodesize; int error; - if (*objectp == 0) { - start_obj = 1; - } else if (ds && ds->ds_feature_inuse[SPA_FEATURE_LARGE_DNODE]) { - uint64_t i = *objectp + 1; - uint64_t last_obj = *objectp | (DNODES_PER_BLOCK - 1); - dmu_object_info_t doi; - - /* - * Scan through the remaining meta dnode block. The contents - * of each slot in the block are known so it can be quickly - * checked. If the block is exhausted without a match then - * hand off to dnode_next_offset() for further scanning. - */ - while (i <= last_obj) { - error = dmu_object_info(os, i, &doi); - if (error == ENOENT) { - if (hole) { - *objectp = i; - return (0); - } else { - i++; - } - } else if (error == EEXIST) { - i++; - } else if (error == 0) { - if (hole) { - i += doi.doi_dnodesize >> DNODE_SHIFT; - } else { - *objectp = i; - return (0); - } - } else { - return (error); - } - } - - start_obj = i; + /* + * Avoid expensive dnode hold if this dataset doesn't use large dnodes. + */ + if (ds && ds->ds_feature_inuse[SPA_FEATURE_LARGE_DNODE]) { + error = dmu_object_info(os, *objectp, &doi); + if (error && !(error == EINVAL && *objectp == 0)) + return (SET_ERROR(error)); + else + dnodesize = doi.doi_dnodesize; } else { - start_obj = *objectp + 1; + dnodesize = DNODE_MIN_SIZE; } - offset = start_obj << DNODE_SHIFT; + if (*objectp == 0) + offset = 1 << DNODE_SHIFT; + else + offset = (*objectp << DNODE_SHIFT) + dnodesize; error = dnode_next_offset(DMU_META_DNODE(os), (hole ? DNODE_FIND_HOLE : 0), &offset, 0, DNODES_PER_BLOCK, txg); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Aug 15 15:27:58 2019 (r351077) @@ -566,9 +566,6 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, bl mutex_init(&os->os_userused_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_obj_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_user_ptr_lock, NULL, MUTEX_DEFAULT, NULL); - os->os_obj_next_percpu_len = boot_ncpus; - os->os_obj_next_percpu = kmem_zalloc(os->os_obj_next_percpu_len * - sizeof (os->os_obj_next_percpu[0]), KM_SLEEP); dnode_special_open(os, &os->os_phys->os_meta_dnode, DMU_META_DNODE_OBJECT, &os->os_meta_dnode); @@ -846,9 +843,6 @@ dmu_objset_evict_done(objset_t *os) */ rw_enter(&os_lock, RW_READER); rw_exit(&os_lock); - - kmem_free(os->os_obj_next_percpu, - os->os_obj_next_percpu_len * sizeof (os->os_obj_next_percpu[0])); mutex_destroy(&os->os_lock); mutex_destroy(&os->os_userused_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Aug 15 15:27:58 2019 (r351077) @@ -1437,12 +1437,17 @@ dmu_recv_begin_check(void *arg, dmu_tx_t *tx) /* * The receiving code doesn't know how to translate large blocks * to smaller ones, so the pool must have the LARGE_BLOCKS - * feature enabled if the stream has LARGE_BLOCKS. Same with - * large dnodes. + * feature enabled if the stream has LARGE_BLOCKS. */ if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) return (SET_ERROR(ENOTSUP)); + + /* + * The receiving code doesn't know how to translate large dnodes + * to smaller ones, so the pool must have the LARGE_DNODE + * feature enabled if the stream has LARGE_DNODE. + */ if ((featureflags & DMU_BACKUP_FEATURE_LARGE_DNODE) && !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_DNODE)) return (SET_ERROR(ENOTSUP)); @@ -1650,9 +1655,6 @@ dmu_recv_resume_begin_check(void *arg, dmu_tx_t *tx) dsl_dataset_t *ds; const char *tofs = drba->drba_cookie->drc_tofs; - /* 6 extra bytes for /%recv */ - char recvname[ZFS_MAX_DATASET_NAME_LEN + 6]; - /* already checked */ ASSERT3U(drrb->drr_magic, ==, DMU_BACKUP_MAGIC); ASSERT(featureflags & DMU_BACKUP_FEATURE_RESUMING); @@ -1680,18 +1682,8 @@ dmu_recv_resume_begin_check(void *arg, dmu_tx_t *tx) !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) return (SET_ERROR(ENOTSUP)); - /* - * The receiving code doesn't know how to translate large blocks - * to smaller ones, so the pool must have the LARGE_BLOCKS - * feature enabled if the stream has LARGE_BLOCKS. Same with - * large dnodes. - */ - if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && - !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) - return (SET_ERROR(ENOTSUP)); - if ((featureflags & DMU_BACKUP_FEATURE_LARGE_DNODE) && - !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_DNODE)) - return (SET_ERROR(ENOTSUP)); + /* 6 extra bytes for /%recv */ + char recvname[ZFS_MAX_DATASET_NAME_LEN + 6]; (void) snprintf(recvname, sizeof (recvname), "%s/%s", tofs, recv_clone_name); @@ -2153,8 +2145,6 @@ receive_object(struct receive_writer_arg *rwa, struct dmu_tx_t *tx; uint64_t object; int err; - uint8_t dn_slots = drro->drr_dn_slots != 0 ? - drro->drr_dn_slots : DNODE_MIN_SLOTS; if (drro->drr_type == DMU_OT_NONE || !DMU_OT_IS_VALID(drro->drr_type) || @@ -2165,16 +2155,15 @@ receive_object(struct receive_writer_arg *rwa, struct drro->drr_blksz < SPA_MINBLOCKSIZE || drro->drr_blksz > spa_maxblocksize(dmu_objset_spa(rwa->os)) || drro->drr_bonuslen > - DN_BONUS_SIZE(spa_maxdnodesize(dmu_objset_spa(rwa->os))) || - dn_slots > - (spa_maxdnodesize(dmu_objset_spa(rwa->os)) >> DNODE_SHIFT)) { + DN_BONUS_SIZE(spa_maxdnodesize(dmu_objset_spa(rwa->os)))) { return (SET_ERROR(EINVAL)); } err = dmu_object_info(rwa->os, drro->drr_object, &doi); - if (err != 0 && err != ENOENT && err != EEXIST) + if (err != 0 && err != ENOENT) return (SET_ERROR(EINVAL)); + object = err == 0 ? drro->drr_object : DMU_NEW_OBJECT; if (drro->drr_object > rwa->max_object) rwa->max_object = drro->drr_object; @@ -2187,66 +2176,18 @@ receive_object(struct receive_writer_arg *rwa, struct if (err == 0) { int nblkptr; - object = drro->drr_object; - nblkptr = deduce_nblkptr(drro->drr_bonustype, drro->drr_bonuslen); if (drro->drr_blksz != doi.doi_data_block_size || - nblkptr < doi.doi_nblkptr || - dn_slots != doi.doi_dnodesize >> DNODE_SHIFT) { + nblkptr < doi.doi_nblkptr) { err = dmu_free_long_range(rwa->os, drro->drr_object, 0, DMU_OBJECT_END); if (err != 0) return (SET_ERROR(EINVAL)); } - } else if (err == EEXIST) { - /* - * The object requested is currently an interior slot of a - * multi-slot dnode. This will be resolved when the next txg - * is synced out, since the send stream will have told us - * to free this slot when we freed the associated dnode - * earlier in the stream. - */ - txg_wait_synced(dmu_objset_pool(rwa->os), 0); - object = drro->drr_object; - } else { - /* object is free and we are about to allocate a new one */ - object = DMU_NEW_OBJECT; } - /* - * If this is a multi-slot dnode there is a chance that this - * object will expand into a slot that is already used by - * another object from the previous snapshot. We must free - * these objects before we attempt to allocate the new dnode. - */ - if (dn_slots > 1) { - boolean_t need_sync = B_FALSE; - - for (uint64_t slot = drro->drr_object + 1; - slot < drro->drr_object + dn_slots; - slot++) { - dmu_object_info_t slot_doi; - - err = dmu_object_info(rwa->os, slot, &slot_doi); - if (err == ENOENT || err == EEXIST) - continue; - else if (err != 0) - return (err); - - err = dmu_free_long_object(rwa->os, slot); - - if (err != 0) - return (err); - - need_sync = B_TRUE; - } - - if (need_sync) - txg_wait_synced(dmu_objset_pool(rwa->os), 0); - } - tx = dmu_tx_create(rwa->os); dmu_tx_hold_bonus(tx, object); err = dmu_tx_assign(tx, TXG_WAIT); @@ -2260,7 +2201,7 @@ receive_object(struct receive_writer_arg *rwa, struct err = dmu_object_claim_dnsize(rwa->os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen, - dn_slots << DNODE_SHIFT, tx); + drro->drr_dn_slots << DNODE_SHIFT, tx); } else if (drro->drr_type != doi.doi_type || drro->drr_blksz != doi.doi_data_block_size || drro->drr_bonustype != doi.doi_bonus_type || @@ -2318,10 +2259,10 @@ receive_freeobjects(struct receive_writer_arg *rwa, dmu_object_info_t doi; int err; - err = dmu_object_info(rwa->os, obj, NULL); + err = dmu_object_info(rwa->os, obj, &doi); if (err == ENOENT) { obj++; - continue; + continue; } else if (err != 0) { return (err); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Aug 15 15:27:58 2019 (r351077) @@ -1252,13 +1252,11 @@ dmu_tx_sa_registration_hold(sa_os_t *sa, dmu_tx_t *tx) void dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t object) { - dmu_tx_hold_t *txh; + dmu_tx_hold_t *txh = dmu_tx_hold_object_impl(tx, + tx->tx_objset, object, THT_SPILL, 0, 0); - txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object, - THT_SPILL, 0, 0); - if (txh != NULL) - (void) refcount_add_many(&txh->txh_space_towrite, - SPA_OLD_MAXBLOCKSIZE, FTAG); + (void) refcount_add_many(&txh->txh_space_towrite, + SPA_OLD_MAXBLOCKSIZE, FTAG); } void Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Aug 15 15:11:20 2019 (r351076) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Aug 15 15:27:58 2019 (r351077) @@ -40,41 +40,21 @@ #include #include -dnode_stats_t dnode_stats = { - { "dnode_hold_dbuf_hold", KSTAT_DATA_UINT64 }, - { "dnode_hold_dbuf_read", KSTAT_DATA_UINT64 }, - { "dnode_hold_alloc_hits", KSTAT_DATA_UINT64 }, - { "dnode_hold_alloc_misses", KSTAT_DATA_UINT64 }, - { "dnode_hold_alloc_interior", KSTAT_DATA_UINT64 }, - { "dnode_hold_alloc_lock_retry", KSTAT_DATA_UINT64 }, - { "dnode_hold_alloc_lock_misses", KSTAT_DATA_UINT64 }, - { "dnode_hold_alloc_type_none", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_hits", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_misses", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_lock_misses", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_lock_retry", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_overflow", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_refcount", KSTAT_DATA_UINT64 }, - { "dnode_hold_free_txg", KSTAT_DATA_UINT64 }, - { "dnode_free_interior_lock_retry", KSTAT_DATA_UINT64 }, - { "dnode_allocate", KSTAT_DATA_UINT64 }, - { "dnode_reallocate", KSTAT_DATA_UINT64 }, - { "dnode_buf_evict", KSTAT_DATA_UINT64 }, - { "dnode_alloc_next_chunk", KSTAT_DATA_UINT64 }, - { "dnode_alloc_race", KSTAT_DATA_UINT64 }, - { "dnode_alloc_next_block", KSTAT_DATA_UINT64 }, - { "dnode_move_invalid", KSTAT_DATA_UINT64 }, - { "dnode_move_recheck1", KSTAT_DATA_UINT64 }, - { "dnode_move_recheck2", KSTAT_DATA_UINT64 }, - { "dnode_move_special", KSTAT_DATA_UINT64 }, - { "dnode_move_handle", KSTAT_DATA_UINT64 }, - { "dnode_move_rwlock", KSTAT_DATA_UINT64 }, - { "dnode_move_active", KSTAT_DATA_UINT64 }, -}; - -static kstat_t *dnode_ksp; static kmem_cache_t *dnode_cache; +/* + * Define DNODE_STATS to turn on statistic gathering. By default, it is only + * turned on when DEBUG is also defined. + */ +#ifdef DEBUG +#define DNODE_STATS +#endif /* DEBUG */ +#ifdef DNODE_STATS +#define DNODE_STAT_ADD(stat) ((stat)++) +#else +#define DNODE_STAT_ADD(stat) /* nothing */ +#endif /* DNODE_STATS */ + static dnode_phys_t dnode_phys_zero; int zfs_default_bs = SPA_MINBLOCKSHIFT; @@ -235,25 +215,12 @@ dnode_init(void) 0, dnode_cons, dnode_dest, NULL, NULL, NULL, 0); #ifdef _KERNEL kmem_cache_set_move(dnode_cache, dnode_move); - - dnode_ksp = kstat_create("zfs", 0, "dnodestats", "misc", - KSTAT_TYPE_NAMED, sizeof (dnode_stats) / sizeof (kstat_named_t), - KSTAT_FLAG_VIRTUAL); - if (dnode_ksp != NULL) { - dnode_ksp->ks_data = &dnode_stats; - kstat_install(dnode_ksp); - } #endif /* _KERNEL */ } void dnode_fini(void) { - if (dnode_ksp != NULL) { - kstat_delete(dnode_ksp); - dnode_ksp = NULL; - } - kmem_cache_destroy(dnode_cache); dnode_cache = NULL; } @@ -366,7 +333,6 @@ dnode_byteswap(dnode_phys_t *dnp) /* Swap SPILL block if we have one */ if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) byteswap_uint64_array(DN_SPILL_BLKPTR(dnp), sizeof (blkptr_t)); - } void @@ -378,7 +344,7 @@ dnode_buf_byteswap(void *vbuf, size_t size) ASSERT((size & (sizeof (dnode_phys_t)-1)) == 0); while (i < size) { - dnode_phys_t *dnp = (void *)(((char *)vbuf) + i); + dnode_phys_t *dnp = vbuf + i; dnode_byteswap(dnp); i += DNODE_MIN_SIZE; @@ -482,10 +448,14 @@ dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_ dmu_zfetch_init(&dn->dn_zfetch, dn); ASSERT(DMU_OT_IS_VALID(dn->dn_phys->dn_type)); - ASSERT(zrl_is_locked(&dnh->dnh_zrlock)); - ASSERT(!DN_SLOT_IS_PTR(dnh->dnh_dnode)); mutex_enter(&os->os_lock); + if (dnh->dnh_dnode != NULL) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Aug 15 15:47:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A5A0ACD28; Thu, 15 Aug 2019 15:47:49 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468W786G9wz40LS; Thu, 15 Aug 2019 15:47:48 +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 B531D1AC78; Thu, 15 Aug 2019 15:47:48 +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 x7FFlmIv078968; Thu, 15 Aug 2019 15:47:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FFlmtn078965; Thu, 15 Aug 2019 15:47:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908151547.x7FFlmtn078965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Aug 2019 15:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351078 - in head: lib/libc/quad stand/libsa X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: lib/libc/quad stand/libsa X-SVN-Commit-Revision: 351078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 15:47:49 -0000 Author: kevans Date: Thu Aug 15 15:47:48 2019 New Revision: 351078 URL: https://svnweb.freebsd.org/changeset/base/351078 Log: stand: kick out quad.h Use quad.h from libc instead for the time being. This reduces the number of nearly-identical-quad.h we have in tree to two with only minor changes. Prototypes for some *sh*di3 have been added to match the copy in libkern. The differences between the two are likely few enough that they can perhaps be merged with little additional effort to bring us down to 1. MFC after: 3 days Deleted: head/stand/libsa/quad.h Modified: head/lib/libc/quad/quad.h head/stand/libsa/Makefile Modified: head/lib/libc/quad/quad.h ============================================================================== --- head/lib/libc/quad/quad.h Thu Aug 15 15:27:58 2019 (r351077) +++ head/lib/libc/quad/quad.h Thu Aug 15 15:47:48 2019 (r351078) @@ -55,6 +55,11 @@ #include #include +#ifdef _STANDALONE +_Static_assert(sizeof(quad_t) == sizeof(int) * 2, + "Bitwise function in libstand are broken on this architecture\n"); +#endif + /* * Depending on the desired operation, we view a `long long' (aka quad_t) in * one or more of the following formats. @@ -79,7 +84,14 @@ union uu { */ #define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) #define LONG_BITS (sizeof(long) * CHAR_BIT) +#ifdef _STANDALONE +/* + * libsa assumes sizeof(int) for qdivrem + */ +#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) +#else #define HALF_BITS (sizeof(long) * CHAR_BIT / 2) +#endif /* * Extract high and low shortwords from longword, and move low shortword of @@ -103,3 +115,7 @@ u_quad_t __udivdi3(u_quad_t a, u_quad_t b); u_quad_t __umoddi3(u_quad_t a, u_quad_t b); typedef unsigned int qshift_t; + +quad_t __ashldi3(quad_t, qshift_t); +quad_t __ashrdi3(quad_t, qshift_t); +quad_t __lshrdi3(quad_t, qshift_t); Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Thu Aug 15 15:27:58 2019 (r351077) +++ head/stand/libsa/Makefile Thu Aug 15 15:47:48 2019 (r351078) @@ -121,6 +121,7 @@ beforedepend: ln -sf ${SYSDIR}/sys/stdint.h stdint.h; \ ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ + ln -sf ${LIBC_SRC}/quad/quad.h quad.h; \ for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \ From owner-svn-src-head@freebsd.org Thu Aug 15 15:49:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FF98ACDD2; Thu, 15 Aug 2019 15:49:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468W8Z0Ksjz40TV; Thu, 15 Aug 2019 15:49:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E264C1AC7D; Thu, 15 Aug 2019 15:49:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FFn1i7079077; Thu, 15 Aug 2019 15:49:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FFn1Nb079076; Thu, 15 Aug 2019 15:49:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908151549.x7FFn1Nb079076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 15:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351079 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 15:49:02 -0000 Author: asomers Date: Thu Aug 15 15:49:01 2019 New Revision: 351079 URL: https://svnweb.freebsd.org/changeset/base/351079 Log: ping6: quiet warning about unused copyright variable Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21270 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Thu Aug 15 15:47:48 2019 (r351078) +++ head/sbin/ping6/ping6.c Thu Aug 15 15:49:01 2019 (r351079) @@ -65,6 +65,7 @@ * SUCH DAMAGE. */ +#if 0 #ifndef lint static const char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ @@ -72,10 +73,9 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -#if 0 static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; -#endif #endif /* not lint */ +#endif #include __FBSDID("$FreeBSD$"); From owner-svn-src-head@freebsd.org Thu Aug 15 15:55:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29DAAAD168; Thu, 15 Aug 2019 15:55:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468WHV0LgZz40yS; Thu, 15 Aug 2019 15:55:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE6241AE4A; Thu, 15 Aug 2019 15:55:01 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FFt1lc084557; Thu, 15 Aug 2019 15:55:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FFt1l9084556; Thu, 15 Aug 2019 15:55:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908151555.x7FFt1l9084556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 15:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351080 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 15:55:02 -0000 Author: asomers Date: Thu Aug 15 15:55:01 2019 New Revision: 351080 URL: https://svnweb.freebsd.org/changeset/base/351080 Log: ping6: quiet an undefined variable warning GCC 4.2 isn't smart enough to know that this variable is already defined by the time it's used. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21269 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Thu Aug 15 15:49:01 2019 (r351079) +++ head/sbin/ping6/ping6.c Thu Aug 15 15:55:01 2019 (r351080) @@ -2082,7 +2082,7 @@ pr_nodeaddr(struct icmp6_nodeinfo *ni, int nilen) if (nilen % (sizeof(u_int32_t) + sizeof(struct in6_addr)) == 0) withttl = 1; while (nilen > 0) { - u_int32_t ttl; + u_int32_t ttl = 0; if (withttl) { /* XXX: alignment? */ From owner-svn-src-head@freebsd.org Thu Aug 15 16:04:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13098AD45C; Thu, 15 Aug 2019 16:04:23 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468WVG6KV4z41QK; Thu, 15 Aug 2019 16:04:22 +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 BACA91B027; Thu, 15 Aug 2019 16:04:22 +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 x7FG4M4n090158; Thu, 15 Aug 2019 16:04:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FG4MeH090157; Thu, 15 Aug 2019 16:04:22 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201908151604.x7FG4MeH090157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 15 Aug 2019 16:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351081 - head/sys/contrib/dev/acpica/include/platform X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/contrib/dev/acpica/include/platform X-SVN-Commit-Revision: 351081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 16:04:23 -0000 Author: jkim Date: Thu Aug 15 16:04:22 2019 New Revision: 351081 URL: https://svnweb.freebsd.org/changeset/base/351081 Log: Enable ACPICA mutex debugging in INVARIANTS case. This lets us detect lock order reversal in ACPICA code to avoid deadlock. Modified: head/sys/contrib/dev/acpica/include/platform/acfreebsd.h Modified: head/sys/contrib/dev/acpica/include/platform/acfreebsd.h ============================================================================== --- head/sys/contrib/dev/acpica/include/platform/acfreebsd.h Thu Aug 15 15:55:01 2019 (r351080) +++ head/sys/contrib/dev/acpica/include/platform/acfreebsd.h Thu Aug 15 16:04:22 2019 (r351081) @@ -203,6 +203,10 @@ #define DEBUGGER_THREADING 0 /* integrated with DDB */ +#ifdef INVARIANTS +#define ACPI_MUTEX_DEBUG +#endif + #else /* _KERNEL */ #if __STDC_HOSTED__ From owner-svn-src-head@freebsd.org Thu Aug 15 16:09:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50D80AD5F4; Thu, 15 Aug 2019 16:09:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Wc80Jwbz41nj; Thu, 15 Aug 2019 16:09:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E01681B03F; Thu, 15 Aug 2019 16:09:27 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FG9RFp090720; Thu, 15 Aug 2019 16:09:27 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FG9RZe090719; Thu, 15 Aug 2019 16:09:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908151609.x7FG9RZe090719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 16:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351082 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 16:09:28 -0000 Author: asomers Date: Thu Aug 15 16:09:27 2019 New Revision: 351082 URL: https://svnweb.freebsd.org/changeset/base/351082 Log: ping6: fix uninitialized variable warning for intvl GCC isn't smart enough to realize that this variable was always initialized. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21271 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Thu Aug 15 16:04:22 2019 (r351081) +++ head/sbin/ping6/ping6.c Thu Aug 15 16:09:27 2019 (r351082) @@ -333,6 +333,9 @@ main(int argc, char *argv[]) memset(&smsghdr, 0, sizeof(smsghdr)); memset(&smsgiov, 0, sizeof(smsgiov)); + intvl.tv_sec = interval / 1000; + intvl.tv_nsec = interval % 1000 * 1000000; + alarmtimeout = preload = 0; datap = &outpack[ICMP6ECHOLEN + ICMP6ECHOTMLEN]; capdns = capdns_setup(); @@ -1121,9 +1124,6 @@ main(int argc, char *argv[]) if (options & F_FLOOD) { intvl.tv_sec = 0; intvl.tv_nsec = 10000000; - } else if ((options & F_INTERVAL) == 0) { - intvl.tv_sec = interval / 1000; - intvl.tv_nsec = interval % 1000 * 1000000; } almost_done = 0; From owner-svn-src-head@freebsd.org Thu Aug 15 16:22:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92F03ADE55; Thu, 15 Aug 2019 16:22:16 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Wtw3R6jz42xl; Thu, 15 Aug 2019 16:22:16 +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 5851C1B386; Thu, 15 Aug 2019 16:22:16 +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 x7FGMGmU000917; Thu, 15 Aug 2019 16:22:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FGMGD1000916; Thu, 15 Aug 2019 16:22:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908151622.x7FGMGD1000916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Aug 2019 16:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351083 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 351083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 16:22:16 -0000 Author: mav Date: Thu Aug 15 16:22:15 2019 New Revision: 351083 URL: https://svnweb.freebsd.org/changeset/base/351083 Log: Fix i386 LINT build after r351056. MFC after: 13 days Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Thu Aug 15 16:09:27 2019 (r351082) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Thu Aug 15 16:22:15 2019 (r351083) @@ -385,14 +385,14 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu /* Make sure the range fits in the usable mw size. */ if (size > bar_info->size) { - amd_ntb_printf(0, "%s: size 0x%x greater than mw_size 0x%x\n", - __func__, (uint32_t)size, (uint32_t)bar_info->size); + amd_ntb_printf(0, "%s: size 0x%jx greater than mw_size 0x%jx\n", + __func__, (uintmax_t)size, (uintmax_t)bar_info->size); return (EINVAL); } - amd_ntb_printf(1, "%s: mw %d mw_size 0x%x size 0x%x base %p\n", - __func__, mw_idx, (uint32_t)bar_info->size, - (uint32_t)size, (void *)bar_info->pci_bus_handle); + amd_ntb_printf(1, "%s: mw %d mw_size 0x%jx size 0x%jx base %p\n", + __func__, mw_idx, (uintmax_t)bar_info->size, + (uintmax_t)size, (void *)bar_info->pci_bus_handle); /* * AMD NTB XLAT and Limit registers needs to be written only after @@ -413,17 +413,17 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu * cases all use 64-bit bar. */ if ((mw_idx == 0) && (ntb->hw_info->quirks & QUIRK_MW0_32BIT)) { - amd_ntb_reg_write(4, bar_info->limit_off, (uint64_t)size); + amd_ntb_reg_write(4, bar_info->limit_off, (uint32_t)size); amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%x limit 0x%x\n", __func__, bar_info->limit_off, amd_ntb_peer_reg_read(4, bar_info->limit_off), (uint32_t)size); } else { amd_ntb_reg_write(8, bar_info->limit_off, (uint64_t)size); - amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%lx limit 0x%x\n", + amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%jx limit 0x%jx\n", __func__, bar_info->limit_off, amd_ntb_peer_reg_read(8, bar_info->limit_off), - (uint32_t)size); + (uintmax_t)size); } return (0); From owner-svn-src-head@freebsd.org Thu Aug 15 16:27:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14043AE126; Thu, 15 Aug 2019 16:27:05 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468X0S6VGpz43Jx; Thu, 15 Aug 2019 16:27:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C05061B3BF; Thu, 15 Aug 2019 16:27:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FGR4u7005297; Thu, 15 Aug 2019 16:27:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FGR4LM005295; Thu, 15 Aug 2019 16:27:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908151627.x7FGR4LM005295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Aug 2019 16:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351084 - in head: share/man/man4 sys/modules X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head: share/man/man4 sys/modules X-SVN-Commit-Revision: 351084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 16:27:05 -0000 Author: mav Date: Thu Aug 15 16:27:04 2019 New Revision: 351084 URL: https://svnweb.freebsd.org/changeset/base/351084 Log: Add NTB modules to i386 build. There is no reason why NTB should not be usable on i386 if memory windows are small enough. Modified: head/share/man/man4/Makefile head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Aug 15 16:22:15 2019 (r351083) +++ head/share/man/man4/Makefile Thu Aug 15 16:27:04 2019 (r351084) @@ -790,6 +790,11 @@ _nda.4= nda.4 _ndis.4= ndis.4 _nfe.4= nfe.4 _nfsmb.4= nfsmb.4 +_if_ntb.4= if_ntb.4 +_ntb.4= ntb.4 +_ntb_hw_intel.4= ntb_hw_intel.4 +_ntb_hw_plx.4= ntb_hw_plx.4 +_ntb_transport.4=ntb_transport.4 _nvd.4= nvd.4 _nvme.4= nvme.4 _nvram.4= nvram.4 @@ -817,12 +822,7 @@ _xnb.4= xnb.4 .endif .if ${MACHINE_CPUARCH} == "amd64" -_if_ntb.4= if_ntb.4 _ioat.4= ioat.4 -_ntb.4= ntb.4 -_ntb_hw_intel.4= ntb_hw_intel.4 -_ntb_hw_plx.4= ntb_hw_plx.4 -_ntb_transport.4=ntb_transport.4 _qlxge.4= qlxge.4 _qlxgb.4= qlxgb.4 _qlxgbe.4= qlxgbe.4 Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Aug 15 16:22:15 2019 (r351083) +++ head/sys/modules/Makefile Thu Aug 15 16:27:04 2019 (r351084) @@ -594,6 +594,7 @@ _lio= lio .endif _nctgpio= nctgpio _ndis= ndis +_ntb= ntb _ocs_fc= ocs_fc _pccard= pccard .if ${MK_OFED} != "no" || defined(ALL_MODULES) @@ -691,7 +692,6 @@ _ioat= ioat _ixl= ixl _linux64= linux64 _linux_common= linux_common -_ntb= ntb _nvdimm= nvdimm _pms= pms _qlxge= qlxge From owner-svn-src-head@freebsd.org Thu Aug 15 16:28:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96417AE1A8; Thu, 15 Aug 2019 16:28:06 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468X1f3QNBz43Rw; Thu, 15 Aug 2019 16:28:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56DE31B3C3; Thu, 15 Aug 2019 16:28:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FGS6MJ005389; Thu, 15 Aug 2019 16:28:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FGS6DW005388; Thu, 15 Aug 2019 16:28:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908151628.x7FGS6DW005388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Aug 2019 16:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351085 - head/lib/libc/quad X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/quad X-SVN-Commit-Revision: 351085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 16:28:06 -0000 Author: kevans Date: Thu Aug 15 16:28:05 2019 New Revision: 351085 URL: https://svnweb.freebsd.org/changeset/base/351085 Log: libc quad.h: one last _STANDALONE correction Modified: head/lib/libc/quad/quad.h Modified: head/lib/libc/quad/quad.h ============================================================================== --- head/lib/libc/quad/quad.h Thu Aug 15 16:27:04 2019 (r351084) +++ head/lib/libc/quad/quad.h Thu Aug 15 16:28:05 2019 (r351085) @@ -67,8 +67,13 @@ _Static_assert(sizeof(quad_t) == sizeof(int) * 2, union uu { quad_t q; /* as a (signed) quad */ quad_t uq; /* as an unsigned quad */ +#ifdef _STANDALONE + int sl[2]; /* as two signed longs */ + u_int ul[2]; /* as two unsigned longs */ +#else long sl[2]; /* as two signed longs */ u_long ul[2]; /* as two unsigned longs */ +#endif }; /* From owner-svn-src-head@freebsd.org Thu Aug 15 16:58:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CDE3AEB8B; Thu, 15 Aug 2019 16:58:01 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Xh925qKz450P; Thu, 15 Aug 2019 16:58:01 +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 2A3181B93D; Thu, 15 Aug 2019 16:58:01 +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 x7FGw13N023049; Thu, 15 Aug 2019 16:58:01 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FGw194023048; Thu, 15 Aug 2019 16:58:01 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201908151658.x7FGw194023048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 15 Aug 2019 16:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351086 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: jmg X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 351086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 16:58:01 -0000 Author: jmg Date: Thu Aug 15 16:58:00 2019 New Revision: 351086 URL: https://svnweb.freebsd.org/changeset/base/351086 Log: finish the pcp feature, but documenting it in the man page... Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Thu Aug 15 16:28:05 2019 (r351085) +++ head/sbin/ifconfig/ifconfig.8 Thu Aug 15 16:58:00 2019 (r351086) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd June 28, 2019 +.Dd August 15, 2019 .Dt IFCONFIG 8 .Os .Sh NAME @@ -705,6 +705,13 @@ No packets are transmitted, and received packets are d processing. .It Fl monitor Take the interface out of monitor mode. +.It Cm pcp Ar priority_code_point +Priority code point +.Pq Dv PCP +is an 3-bit field which refers to the IEEE 802.1p +class of service and maps to the frame priority level. +.It Fl pcp +Stop tagging packets on the interface w/ the priority code point. .It Cm up Mark an interface .Dq up . From owner-svn-src-head@freebsd.org Thu Aug 15 17:06:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7554AF2D1; Thu, 15 Aug 2019 17:06:53 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468XtP5Ljxz45y5; Thu, 15 Aug 2019 17:06:53 +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 94BBC1BB0C; Thu, 15 Aug 2019 17:06:53 +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 x7FH6r0U029249; Thu, 15 Aug 2019 17:06:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FH6reN029248; Thu, 15 Aug 2019 17:06:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908151706.x7FH6reN029248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 15 Aug 2019 17:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351087 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 351087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:06:53 -0000 Author: imp Date: Thu Aug 15 17:06:53 2019 New Revision: 351087 URL: https://svnweb.freebsd.org/changeset/base/351087 Log: Sort getopt(3) options and case statements per style(9) Alphebetize the options and cases without regard for case. Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Thu Aug 15 16:58:00 2019 (r351086) +++ head/usr.sbin/config/main.c Thu Aug 15 17:06:53 2019 (r351087) @@ -120,11 +120,20 @@ main(int argc, char **argv) printmachine = 0; kernfile = NULL; SLIST_INIT(&includepath); - while ((ch = getopt(argc, argv, "CI:d:gmps:Vx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gI:mps:Vx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'd': + if (*destdir == '\0') + strlcpy(destdir, optarg, sizeof(destdir)); + else + errx(EXIT_FAILURE, "directory already set"); + break; + case 'g': + debugging++; + break; case 'I': ipath = (struct includepath *) \ calloc(1, sizeof (struct includepath)); @@ -135,15 +144,6 @@ main(int argc, char **argv) break; case 'm': printmachine = 1; - break; - case 'd': - if (*destdir == '\0') - strlcpy(destdir, optarg, sizeof(destdir)); - else - errx(EXIT_FAILURE, "directory already set"); - break; - case 'g': - debugging++; break; case 'p': profiling++; From owner-svn-src-head@freebsd.org Thu Aug 15 17:15:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB465AF91D; Thu, 15 Aug 2019 17:15: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Y4P4Xyjz473d; Thu, 15 Aug 2019 17:15: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 7D28F1BCD0; Thu, 15 Aug 2019 17:15:33 +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 x7FHFXAo035034; Thu, 15 Aug 2019 17:15:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHFWGe035032; Thu, 15 Aug 2019 17:15:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908151715.x7FHFWGe035032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Aug 2019 17:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351088 - in head: lib/libc/quad stand/libsa X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: lib/libc/quad stand/libsa X-SVN-Commit-Revision: 351088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:15:33 -0000 Author: kevans Date: Thu Aug 15 17:15:32 2019 New Revision: 351088 URL: https://svnweb.freebsd.org/changeset/base/351088 Log: Revert r351078, r351085: stand/quad.h eviction It did not go well; further examination is required... Added: head/stand/libsa/quad.h - copied unchanged from r351077, head/stand/libsa/quad.h Modified: head/lib/libc/quad/quad.h head/stand/libsa/Makefile Modified: head/lib/libc/quad/quad.h ============================================================================== --- head/lib/libc/quad/quad.h Thu Aug 15 17:06:53 2019 (r351087) +++ head/lib/libc/quad/quad.h Thu Aug 15 17:15:32 2019 (r351088) @@ -55,11 +55,6 @@ #include #include -#ifdef _STANDALONE -_Static_assert(sizeof(quad_t) == sizeof(int) * 2, - "Bitwise function in libstand are broken on this architecture\n"); -#endif - /* * Depending on the desired operation, we view a `long long' (aka quad_t) in * one or more of the following formats. @@ -67,13 +62,8 @@ _Static_assert(sizeof(quad_t) == sizeof(int) * 2, union uu { quad_t q; /* as a (signed) quad */ quad_t uq; /* as an unsigned quad */ -#ifdef _STANDALONE - int sl[2]; /* as two signed longs */ - u_int ul[2]; /* as two unsigned longs */ -#else long sl[2]; /* as two signed longs */ u_long ul[2]; /* as two unsigned longs */ -#endif }; /* @@ -89,14 +79,7 @@ union uu { */ #define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) #define LONG_BITS (sizeof(long) * CHAR_BIT) -#ifdef _STANDALONE -/* - * libsa assumes sizeof(int) for qdivrem - */ -#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) -#else #define HALF_BITS (sizeof(long) * CHAR_BIT / 2) -#endif /* * Extract high and low shortwords from longword, and move low shortword of @@ -120,7 +103,3 @@ u_quad_t __udivdi3(u_quad_t a, u_quad_t b); u_quad_t __umoddi3(u_quad_t a, u_quad_t b); typedef unsigned int qshift_t; - -quad_t __ashldi3(quad_t, qshift_t); -quad_t __ashrdi3(quad_t, qshift_t); -quad_t __lshrdi3(quad_t, qshift_t); Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Thu Aug 15 17:06:53 2019 (r351087) +++ head/stand/libsa/Makefile Thu Aug 15 17:15:32 2019 (r351088) @@ -121,7 +121,6 @@ beforedepend: ln -sf ${SYSDIR}/sys/stdint.h stdint.h; \ ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ - ln -sf ${LIBC_SRC}/quad/quad.h quad.h; \ for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \ Copied: head/stand/libsa/quad.h (from r351077, head/stand/libsa/quad.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/libsa/quad.h Thu Aug 15 17:15:32 2019 (r351088, copy of r351077, head/stand/libsa/quad.h) @@ -0,0 +1,114 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This software was developed by the Computer Systems Engineering group + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and + * contributed to Berkeley. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)quad.h 8.1 (Berkeley) 6/4/93 + * $FreeBSD$ + */ + +/* + * Quad arithmetic. + * + * This library makes the following assumptions: + * + * - The type long long (aka quad_t) exists. + * + * - A quad variable is exactly twice as long as `long'. + * + * - The machine's arithmetic is two's complement. + * + * This library can provide 128-bit arithmetic on a machine with 128-bit + * quads and 64-bit longs, for instance, or 96-bit arithmetic on machines + * with 48-bit longs. + */ + +#include +#include +#include + +_Static_assert(sizeof(quad_t) == sizeof(int) * 2, + "Bitwise function in libstand are broken on this architecture\n"); + +/* + * Depending on the desired operation, we view a `long long' (aka quad_t) in + * one or more of the following formats. + */ +union uu { + quad_t q; /* as a (signed) quad */ + quad_t uq; /* as an unsigned quad */ + int sl[2]; /* as two signed ints */ + u_int ul[2]; /* as two unsigned ints */ +}; + +/* + * Define high and low longwords. + */ +#define H _QUAD_HIGHWORD +#define L _QUAD_LOWWORD + +/* + * Total number of bits in a quad_t and in the pieces that make it up. + * These are used for shifting, and also below for halfword extraction + * and assembly. + */ +#define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) +#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) + +/* + * Extract high and low shortwords from longword, and move low shortword of + * longword to upper half of long, i.e., produce the upper longword of + * ((quad_t)(x) << (number_of_bits_in_long/2)). (`x' must actually be u_long.) + * + * These are used in the multiply code, to split a longword into upper + * and lower halves, and to reassemble a product as a quad_t, shifted left + * (sizeof(long)*CHAR_BIT/2). + */ +#define HHALF(x) ((x) >> HALF_BITS) +#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1)) +#define LHUP(x) ((x) << HALF_BITS) + +quad_t __divdi3(quad_t a, quad_t b); +quad_t __moddi3(quad_t a, quad_t b); +u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); +u_quad_t __udivdi3(u_quad_t a, u_quad_t b); +u_quad_t __umoddi3(u_quad_t a, u_quad_t b); + +/* + * XXX + * Compensate for gcc 1 vs gcc 2. Gcc 1 defines ?sh?di3's second argument + * as u_quad_t, while gcc 2 correctly uses int. Unfortunately, we still use + * both compilers. + */ +#if __GNUC__ >= 2 +typedef unsigned int qshift_t; +#else +typedef u_quad_t qshift_t; +#endif From owner-svn-src-head@freebsd.org Thu Aug 15 17:21:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B21BAFB6C; Thu, 15 Aug 2019 17:21:39 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468YCQ67SNz47My; Thu, 15 Aug 2019 17:21:38 +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 ADB5F1BE4F; Thu, 15 Aug 2019 17:21:38 +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 x7FHLcpB038392; Thu, 15 Aug 2019 17:21:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHLcCl038376; Thu, 15 Aug 2019 17:21:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908151721.x7FHLcCl038376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 15 Aug 2019 17:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351089 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 351089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:21:39 -0000 Author: imp Date: Thu Aug 15 17:21:38 2019 New Revision: 351089 URL: https://svnweb.freebsd.org/changeset/base/351089 Log: Catch mkheaders.c up to the removal of counted device support in 2005. mkheaders.c hasn't made headers in ~15 years. Belatedly update the comments to reflect that all it does these days is warn about 'device foo' lines in the config where we don't know what a 'foo' is. Remove extra includes too. These also haven't been needed for 15 years and weren't removed at the time the comment wasn't updated... Modified: head/usr.sbin/config/mkheaders.c Modified: head/usr.sbin/config/mkheaders.c ============================================================================== --- head/usr.sbin/config/mkheaders.c Thu Aug 15 17:15:32 2019 (r351088) +++ head/usr.sbin/config/mkheaders.c Thu Aug 15 17:21:38 2019 (r351089) @@ -38,14 +38,14 @@ static const char rcsid[] = #endif /* not lint */ /* - * Make all the .h files for the optional entries + * This used to generate a bunch of hearders files related to devices when + * device counters were supported. Support for that was removed in 2005. + * Since then, all we've done is to report unknown devices in this file. + * It's kept its historical name, despite no longer generating headers. */ -#include #include #include -#include -#include #include "config.h" #include "y.tab.h" From owner-svn-src-head@freebsd.org Thu Aug 15 17:24:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 314EFAFD94; Thu, 15 Aug 2019 17:24:11 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468YGM0QF3z47jb; Thu, 15 Aug 2019 17:24:11 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E46001BEB7; Thu, 15 Aug 2019 17:24:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FHOAgo040925; Thu, 15 Aug 2019 17:24:10 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHOAee040924; Thu, 15 Aug 2019 17:24:10 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908151724.x7FHOAee040924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 17:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351090 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:24:11 -0000 Author: asomers Date: Thu Aug 15 17:24:10 2019 New Revision: 351090 URL: https://svnweb.freebsd.org/changeset/base/351090 Log: ping6: Fix data type of the buffer for ancillary data of a received message The old code worked, but wasted some stack space. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21275 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Thu Aug 15 17:21:38 2019 (r351089) +++ head/sbin/ping6/ping6.c Thu Aug 15 17:24:10 2019 (r351090) @@ -307,7 +307,7 @@ main(int argc, char *argv[]) int ip6optlen = 0; struct cmsghdr *scmsgp = NULL; /* For control (ancillary) data received from recvmsg() */ - struct cmsghdr cm[CONTROLLEN]; + u_char cm[CONTROLLEN]; #if defined(SO_SNDBUF) && defined(SO_RCVBUF) u_long lsockbufsize; int sockbufsize = 0; From owner-svn-src-head@freebsd.org Thu Aug 15 17:32:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC717B01B7; Thu, 15 Aug 2019 17:32:39 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468YS75StFz48W2; Thu, 15 Aug 2019 17:32:39 +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 9D6A91C078; Thu, 15 Aug 2019 17:32:39 +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 x7FHWdpc047426; Thu, 15 Aug 2019 17:32:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHWdN7047425; Thu, 15 Aug 2019 17:32:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908151732.x7FHWdN7047425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 17:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351092 - head/stand/i386/cdboot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/stand/i386/cdboot X-SVN-Commit-Revision: 351092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:32:39 -0000 Author: emaste Date: Thu Aug 15 17:32:39 2019 New Revision: 351092 URL: https://svnweb.freebsd.org/changeset/base/351092 Log: stand: remove CLANG_NO_IAS from cdboot Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including cdboot, so CLANG_NO_IAS was not previously removed for those. In the case of cdboot the difference is that IAS adds a size override prefix (67h) to many instructions to specify a 32-bit address, even though the two high bytes are zero. This wastes three bytes per instance, but as cdboot is not size-constrained it doesn't matter. Padding is also different in one case; Clang used two one-byte nops while GNU as used a single two-byte xchg %eax, %eax. In any case, there is no functional change. Sponsored by: The FreeBSD Foundation Modified: head/stand/i386/cdboot/Makefile Modified: head/stand/i386/cdboot/Makefile ============================================================================== --- head/stand/i386/cdboot/Makefile Thu Aug 15 17:31:11 2019 (r351091) +++ head/stand/i386/cdboot/Makefile Thu Aug 15 17:32:39 2019 (r351092) @@ -14,6 +14,3 @@ ORG= 0x7c00 LDFLAGS+=${LDFLAGS_BIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.cdboot.S= ${CLANG_NO_IAS} From owner-svn-src-head@freebsd.org Thu Aug 15 17:35:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78BFBB04AA; Thu, 15 Aug 2019 17:35:25 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468YWK2c1jz48wf; Thu, 15 Aug 2019 17:35:25 +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 3BF251C082; Thu, 15 Aug 2019 17:35:25 +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 x7FHZPxp047871; Thu, 15 Aug 2019 17:35:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHZP0I047870; Thu, 15 Aug 2019 17:35:25 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908151735.x7FHZP0I047870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Aug 2019 17:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351093 - head/libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 351093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:35:25 -0000 Author: kevans Date: Thu Aug 15 17:35:24 2019 New Revision: 351093 URL: https://svnweb.freebsd.org/changeset/base/351093 Log: rtld-elf: fix build with xtoolchain-llvm90 strstr ends up using bcmp when compiled with llvm90; pull it in from libc as well. MFC after: 3 days Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Thu Aug 15 17:32:39 2019 (r351092) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Thu Aug 15 17:35:24 2019 (r351093) @@ -40,7 +40,7 @@ CFLAGS.errlst.c+=-I${LIBC_SRCTOP}/include # Use the string and memory .o files from libc instead of rebuilding them (they # might be using optimized assembly and duplicating that logic here is awkward). -_libc_string_objects= bcopy memchr memcmp memcpy memmove stpncpy strcat \ +_libc_string_objects= bcmp bcopy memchr memcmp memcpy memmove stpncpy strcat \ strchr strcmp stpcpy strcpy strcspn strdup strlcat strlcpy strlen strncmp \ strncpy strrchr strsep strspn strstr strtok # Also use all the syscall .o files from libc_nossp_pic: From owner-svn-src-head@freebsd.org Thu Aug 15 17:36:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 002F1B0594; Thu, 15 Aug 2019 17:36:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 468YXn683Mz499G; Thu, 15 Aug 2019 17:36:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 89BD751D3; Thu, 15 Aug 2019 17:36:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-wr1-f45.google.com with SMTP id z1so2882356wru.13; Thu, 15 Aug 2019 10:36:41 -0700 (PDT) X-Gm-Message-State: APjAAAURvEsZNyhYtFMD1udAIkOrKy63O1sLHb/uLGWaoSX0CNfXLvMs t47ZOa2QBxzcDwikYu0Edx86pcto5MDQjZcu5PI= X-Google-Smtp-Source: APXvYqx8qjgDg89FG8w+NqpLNGTQJYf8fvEkUfA4dWuOFvzF9mGil4ffk0Boht1tDdSGVfhPW6xXXOsjLtLTZ9kjYVw= X-Received: by 2002:adf:ce8d:: with SMTP id r13mr6626356wrn.37.1565890600483; Thu, 15 Aug 2019 10:36:40 -0700 (PDT) MIME-Version: 1.0 References: <201908151735.x7FHZP0I047870@repo.freebsd.org> In-Reply-To: <201908151735.x7FHZP0I047870@repo.freebsd.org> From: Kyle Evans Date: Thu, 15 Aug 2019 12:36:27 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r351093 - head/libexec/rtld-elf/rtld-libc To: Kyle Evans 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.29 Precedence: list List-Id: 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, 15 Aug 2019 17:36:42 -0000 On Thu, Aug 15, 2019 at 12:35 PM Kyle Evans wrote: > > Author: kevans > Date: Thu Aug 15 17:35:24 2019 > New Revision: 351093 > URL: https://svnweb.freebsd.org/changeset/base/351093 > > Log: > rtld-elf: fix build with xtoolchain-llvm90 > > strstr ends up using bcmp when compiled with llvm90; pull it in from libc > as well. > > MFC after: 3 days > Reviewed by: arichardson, kib Differential Revision: https://reviews.freebsd.org/D21274 From owner-svn-src-head@freebsd.org Thu Aug 15 17:43:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA43EB0C20; Thu, 15 Aug 2019 17:43:41 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Yhs4jtHz4BSF; Thu, 15 Aug 2019 17:43:41 +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 844CC1C25C; Thu, 15 Aug 2019 17:43:41 +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 x7FHhf10054309; Thu, 15 Aug 2019 17:43:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHhb9W054284; Thu, 15 Aug 2019 17:43:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201908151743.x7FHhb9W054284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 15 Aug 2019 17:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351095 - in head/sys/contrib/dev/acpica: . compiler components/dispatcher components/events components/executer components/namespace components/tables components/utilities include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . compiler components/dispatcher components/events components/executer components/namespace components/tables components/utilities include X-SVN-Commit-Revision: 351095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:43:41 -0000 Author: jkim Date: Thu Aug 15 17:43:36 2019 New Revision: 351095 URL: https://svnweb.freebsd.org/changeset/base/351095 Log: MFV: r351091 Fix the reported boot failures and revert r350510. Note this commit is effectively merging ACPICA 20190703 again and applying an upstream patch. https://github.com/acpica/acpica/commit/73f6372 Tested by: scottl Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acpixf.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 Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/changes.txt Thu Aug 15 17:43:36 2019 (r351095) @@ -1,4 +1,53 @@ ---------------------------------------- +03 July 2019. Summary of changes for version 20190703: + + +1) ACPICA kernel-resident subsystem: + +Remove legacy module-level support code. There were still some remnants +of the legacy module-level code executions. Since we no longer support +this option, this is essentially dead code and has been removed from the +ACPICA source. + +iASL: ensure that _WAK, _PTS, _TTS, and _Sx are declared only at the root +scope. If these named objects are declared outside the root scope, they +will not be invoked by any host Operating System. + +Clear status of GPEs on first direct enable. ACPI GPEs (other than the EC +one) can be enabled in two situations. First, the GPEs with existing _Lxx +and _Exx methods are enabled implicitly by ACPICA during system +initialization. Second, the GPEs without these methods (like GPEs listed +by _PRW objects for wakeup devices) need to be enabled directly by the +code that is going to use them (e.g. ACPI power management or device +drivers). + +In the former case, if the status of a given GPE is set to start with, +its handler method (either _Lxx or _Exx) needs to be invoked to take care +of the events (possibly) signaled before the GPE was enabled. In the +latter case, however, the first caller of AcpiEnableGpe() for a given GPE +should not be expected to care about any events that might be signaled +through it earlier. In that case, it is better to clear the status of +the GPE before enabling it, to prevent stale events from triggering +unwanted actions (like spurious system resume, for example). + +For this reason, modify AcpiEvAddGpeReference() to take an additional +boolean argument indicating whether or not the GPE status needs to be +cleared when its reference counter changes from zero to one and make +AcpiEnableGpe() pass TRUE to it through that new argument. + + +2) iASL Compiler/Disassembler and ACPICA tools: + +The tool generation process has been migrated to MSVC 2017, and all +project files have been upgraded. The new project files appear in the +directory \acpica\generate\msvc2017. This change effectively deprecates +the older project files in \acpica\generate\msvc9. + +iASL: ensure that _WAK, _PTS, _TTS, and _Sx are declared only at the root +scope. If these named objects are declared outside the root scope, they +will not be invoked by any host Operating System + +---------------------------------------- 09 May 2019. Summary of changes for version 20190509: Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Aug 15 17:43:36 2019 (r351095) @@ -298,4 +298,20 @@ #define COMMENT_CAPTURE_ON AslGbl_CommentState.CaptureComments = TRUE; #define COMMENT_CAPTURE_OFF AslGbl_CommentState.CaptureComments = FALSE; +/* + * Special name segments - these must only be declared at the root scope + */ +#define NAMESEG__PTS "_PTS" +#define NAMESEG__WAK "_WAK" +#define NAMESEG__S0 "_S0_" +#define NAMESEG__S1 "_S1_" +#define NAMESEG__S2 "_S2_" +#define NAMESEG__S3 "_S3_" +#define NAMESEG__S4 "_S4_" +#define NAMESEG__S5 "_S5_" +#define NAMESEG__TTS "_TTS" + +#define MAX_SPECIAL_NAMES 9 + + #endif /* ASLDEFINE.H */ Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Aug 15 17:43:36 2019 (r351095) @@ -223,11 +223,26 @@ const char *AslGbl_OpFlagName "OP_NOT_FOUND_DURING_LOAD" }; +const char *AslGbl_SpecialNamedObjects [MAX_SPECIAL_NAMES] = +{ + NAMESEG__PTS, + NAMESEG__WAK, + NAMESEG__S0, + NAMESEG__S1, + NAMESEG__S2, + NAMESEG__S3, + NAMESEG__S4, + NAMESEG__S5, + NAMESEG__TTS +}; + #else extern ASL_FILE_DESC AslGbl_FileDescs [ASL_NUM_FILES]; extern UINT32 AslGbl_ExceptionCount[ASL_NUM_REPORT_LEVELS]; extern const char *AslGbl_OpFlagNames[ACPI_NUM_OP_FLAGS]; +extern const char *AslGbl_SpecialNamedObjects[MAX_SPECIAL_NAMES]; #endif + /* Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Thu Aug 15 17:43:36 2019 (r351095) @@ -164,6 +164,7 @@ static ACPI_STATUS LdLoadFieldElements ( + UINT32 AmlType, ACPI_PARSE_OBJECT *Op, ACPI_WALK_STATE *WalkState); @@ -190,6 +191,10 @@ LdCommonNamespaceEnd ( UINT32 Level, void *Context); +static void +LdCheckSpecialNames ( + ACPI_NAMESPACE_NODE *Node, + ACPI_PARSE_OBJECT *Op); /******************************************************************************* * @@ -247,7 +252,8 @@ LdLoadNamespace ( * * FUNCTION: LdLoadFieldElements * - * PARAMETERS: Op - Parent node (Field) + * PARAMETERS: AmlType - Type to search + * Op - Parent node (Field) * WalkState - Current walk state * * RETURN: Status @@ -259,6 +265,7 @@ LdLoadNamespace ( static ACPI_STATUS LdLoadFieldElements ( + UINT32 AmlType, ACPI_PARSE_OBJECT *Op, ACPI_WALK_STATE *WalkState) { @@ -274,7 +281,7 @@ LdLoadFieldElements ( { Status = AcpiNsLookup (WalkState->ScopeInfo, SourceRegion->Asl.Value.String, - ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, + AmlType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node); if (Status == AE_NOT_FOUND) { @@ -507,11 +514,15 @@ LdNamespace1Begin ( */ switch (Op->Asl.AmlOpcode) { - case AML_BANK_FIELD_OP: case AML_INDEX_FIELD_OP: + + Status = LdLoadFieldElements (ACPI_TYPE_LOCAL_REGION_FIELD, Op, WalkState); + return (Status); + + case AML_BANK_FIELD_OP: case AML_FIELD_OP: - Status = LdLoadFieldElements (Op, WalkState); + Status = LdLoadFieldElements (ACPI_TYPE_REGION, Op, WalkState); return (Status); case AML_INT_CONNECTION_OP: @@ -966,6 +977,10 @@ LdNamespace1Begin ( } } + /* Check special names like _WAK and _PTS */ + + LdCheckSpecialNames (Node, Op); + if (ForceNewScope) { Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState); @@ -1001,6 +1016,42 @@ FinishNode: } return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: LdCheckSpecialNames + * + * PARAMETERS: Node - Node that represents the named object + * Op - Named object declaring this named object + * + * RETURN: None + * + * DESCRIPTION: Check if certain named objects are declared in the incorrect + * scope. Special named objects are listed in + * AslGbl_SpecialNamedObjects and can only be declared at the root + * scope. + * + ******************************************************************************/ + +static void +LdCheckSpecialNames ( + ACPI_NAMESPACE_NODE *Node, + ACPI_PARSE_OBJECT *Op) +{ + UINT32 i; + + + for (i = 0; i < MAX_SPECIAL_NAMES; i++) + { + if (ACPI_COMPARE_NAMESEG(Node->Name.Ascii, AslGbl_SpecialNamedObjects[i]) && + Node->Parent != AcpiGbl_RootNode) + { + AslError (ASL_ERROR, ASL_MSG_INVALID_SPECIAL_NAME, Op, Op->Asl.ExternalName); + return; + } + } } Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Thu Aug 15 17:43:36 2019 (r351095) @@ -365,7 +365,8 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_REGION_LENGTH */ "Operation Region declared with zero length", /* ASL_MSG_TEMPORARY_OBJECT */ "Object is created temporarily in another method and cannot be accessed", /* ASL_MSG_UNDEFINED_EXTERNAL */ "Named object was declared external but the actual definition does not exist", -/* ASL_MSG_BUFFER_FIELD_OVERFLOW */ "Buffer field extends beyond end of target buffer" +/* ASL_MSG_BUFFER_FIELD_OVERFLOW */ "Buffer field extends beyond end of target buffer", +/* ASL_MSG_INVALID_SPECIAL_NAME */ "declaration of this named object outside root scope is illegal" }; /* Table compiler */ Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.h Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.h Thu Aug 15 17:43:36 2019 (r351095) @@ -368,6 +368,7 @@ typedef enum ASL_MSG_TEMPORARY_OBJECT, ASL_MSG_UNDEFINED_EXTERNAL, ASL_MSG_BUFFER_FIELD_OVERFLOW, + ASL_MSG_INVALID_SPECIAL_NAME, /* These messages are used by the Data Table compiler only */ Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Aug 15 17:43:36 2019 (r351095) @@ -166,12 +166,6 @@ * Things like Events, Global Lock, etc. are not used * by the compiler, so they are stubbed out here. */ -void -AcpiNsExecModuleCodeList ( - void) -{ -} - ACPI_STATUS AcpiNsInitializeObjects ( void) Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslsupport.l Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/compiler/aslsupport.l Thu Aug 15 17:43:36 2019 (r351095) @@ -220,7 +220,7 @@ AslDoLineDirective ( while ((c = input()) != '\n' && c != EOF) { - *AslGbl_LineBufPtr = c; + *AslGbl_LineBufPtr = (char) c; AslGbl_LineBufPtr++; } *AslGbl_LineBufPtr = 0; @@ -498,7 +498,7 @@ AslInsertLineBuffer ( if (AcpiGbl_CaptureComments) { - CvProcessCommentState (SourceChar); + CvProcessCommentState ((char) SourceChar); } } } @@ -601,7 +601,7 @@ loop: AslInsertLineBuffer (c); if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { - *StringBuffer = c; + *StringBuffer = (char) c; ++StringBuffer; } c1 = c; @@ -629,7 +629,7 @@ loop: AslInsertLineBuffer (c); if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { - *StringBuffer = c; + *StringBuffer = (char) c; ++StringBuffer; } @@ -720,7 +720,7 @@ AslDoCommentType2 ( AslInsertLineBuffer (c); if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) { - *StringBuffer = c; + *StringBuffer = (char) c; ++StringBuffer; } } @@ -878,7 +878,7 @@ DoCharacter: if (ACPI_IS_OCTAL_DIGIT (StringChar)) { State = ASL_OCTAL_CONSTANT; - ConvertBuffer[0] = StringChar; + ConvertBuffer[0] = (char) StringChar; i = 1; continue; } @@ -934,7 +934,7 @@ DoCharacter: /* Append another digit of the constant */ - ConvertBuffer[i] = StringChar; + ConvertBuffer[i] = (char) StringChar; i++; continue; @@ -978,7 +978,7 @@ DoCharacter: /* Append another digit of the constant */ - ConvertBuffer[i] = StringChar; + ConvertBuffer[i] = (char) StringChar; i++; continue; @@ -989,7 +989,7 @@ DoCharacter: /* Save the finished character */ - *StringBuffer = StringChar; + *StringBuffer = (char) StringChar; StringBuffer++; if (StringBuffer >= EndBuffer) { Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c Thu Aug 15 17:43:36 2019 (r351095) @@ -362,7 +362,7 @@ AcpiDsInitializeObjects ( if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - "\nInitializing Namespace objects:\n")); + "\nACPI table initialization:\n")); } /* Summary of objects initialized */ Modified: head/sys/contrib/dev/acpica/components/events/evgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evgpe.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/events/evgpe.c Thu Aug 15 17:43:36 2019 (r351095) @@ -316,6 +316,7 @@ AcpiEvMaskGpe ( * FUNCTION: AcpiEvAddGpeReference * * PARAMETERS: GpeEventInfo - Add a reference to this GPE + * ClearOnEnable - Clear GPE status before enabling it * * RETURN: Status * @@ -326,7 +327,8 @@ AcpiEvMaskGpe ( ACPI_STATUS AcpiEvAddGpeReference ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) + ACPI_GPE_EVENT_INFO *GpeEventInfo, + BOOLEAN ClearOnEnable) { ACPI_STATUS Status = AE_OK; @@ -343,6 +345,11 @@ AcpiEvAddGpeReference ( if (GpeEventInfo->RuntimeCount == 1) { /* Enable on first reference */ + + if (ClearOnEnable) + { + (void) AcpiHwClearGpe (GpeEventInfo); + } Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo); if (ACPI_SUCCESS (Status)) Modified: head/sys/contrib/dev/acpica/components/events/evgpeblk.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evgpeblk.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/events/evgpeblk.c Thu Aug 15 17:43:36 2019 (r351095) @@ -637,7 +637,7 @@ AcpiEvInitializeGpeBlock ( continue; } - Status = AcpiEvAddGpeReference (GpeEventInfo); + Status = AcpiEvAddGpeReference (GpeEventInfo, FALSE); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, Modified: head/sys/contrib/dev/acpica/components/events/evxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evxface.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/events/evxface.c Thu Aug 15 17:43:36 2019 (r351095) @@ -1256,7 +1256,7 @@ AcpiRemoveGpeHandler ( ACPI_GPE_DISPATCH_NOTIFY)) && Handler->OriginallyEnabled) { - (void) AcpiEvAddGpeReference (GpeEventInfo); + (void) AcpiEvAddGpeReference (GpeEventInfo, FALSE); if (ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) { /* Poll edge triggered GPEs to handle existing events */ Modified: head/sys/contrib/dev/acpica/components/events/evxfgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evxfgpe.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/events/evxfgpe.c Thu Aug 15 17:43:36 2019 (r351095) @@ -267,7 +267,7 @@ AcpiEnableGpe ( if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_NONE) { - Status = AcpiEvAddGpeReference (GpeEventInfo); + Status = AcpiEvAddGpeReference (GpeEventInfo, TRUE); if (ACPI_SUCCESS (Status) && ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) { Modified: head/sys/contrib/dev/acpica/components/executer/exconfig.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exconfig.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/executer/exconfig.c Thu Aug 15 17:43:36 2019 (r351095) @@ -342,10 +342,11 @@ AcpiExLoadTableOp ( return_ACPI_STATUS (Status); } - /* Complete the initialization/resolution of package objects */ + /* Complete the initialization/resolution of new objects */ - Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + AcpiExExitInterpreter(); + AcpiNsInitializeObjects(); + AcpiExEnterInterpreter(); /* Parameter Data (optional) */ @@ -620,10 +621,11 @@ AcpiExLoadOp ( return_ACPI_STATUS (Status); } - /* Complete the initialization/resolution of package objects */ + /* Complete the initialization/resolution of new objects */ - Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + AcpiExExitInterpreter (); + AcpiNsInitializeObjects (); + AcpiExEnterInterpreter (); /* Store the DdbHandle into the Target operand */ Modified: head/sys/contrib/dev/acpica/components/namespace/nsaccess.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsaccess.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/namespace/nsaccess.c Thu Aug 15 17:43:36 2019 (r351095) @@ -184,6 +184,7 @@ AcpiNsRootInitialize ( ACPI_STATUS Status; const ACPI_PREDEFINED_NAMES *InitVal = NULL; ACPI_NAMESPACE_NODE *NewNode; + ACPI_NAMESPACE_NODE *PrevNode = NULL; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_STRING Val = NULL; @@ -213,13 +214,30 @@ AcpiNsRootInitialize ( */ AcpiGbl_RootNode = &AcpiGbl_RootNodeStruct; - /* Enter the pre-defined names in the name table */ + /* Enter the predefined names in the name table */ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Entering predefined entries into namespace\n")); + /* + * Create the initial (default) namespace. + * This namespace looks like something similar to this: + * + * ACPI Namespace (from Namespace Root): + * 0 _GPE Scope 00203160 00 + * 0 _PR_ Scope 002031D0 00 + * 0 _SB_ Device 00203240 00 Notify Object: 0020ADD8 + * 0 _SI_ Scope 002032B0 00 + * 0 _TZ_ Device 00203320 00 + * 0 _REV Integer 00203390 00 = 0000000000000002 + * 0 _OS_ String 00203488 00 Len 14 "Microsoft Windows NT" + * 0 _GL_ Mutex 00203580 00 Object 002035F0 + * 0 _OSI Method 00203678 00 Args 1 Len 0000 Aml 00000000 + */ for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++) { + Status = AE_OK; + /* _OSI is optional for now, will be permanent later */ if (!strcmp (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod) @@ -227,17 +245,35 @@ AcpiNsRootInitialize ( continue; } - Status = AcpiNsLookup (NULL, ACPI_CAST_PTR (char, InitVal->Name), - InitVal->Type, ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, - NULL, &NewNode); - if (ACPI_FAILURE (Status)) + /* + * Create, init, and link the new predefined name + * Note: No need to use AcpiNsLookup here because all the + * predefined names are at the root level. It is much easier to + * just create and link the new node(s) here. + */ + NewNode = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_NAMESPACE_NODE)); + if (!NewNode) { - ACPI_EXCEPTION ((AE_INFO, Status, - "Could not create predefined name %s", - InitVal->Name)); - continue; + Status = AE_NO_MEMORY; + goto UnlockAndExit; } + ACPI_COPY_NAMESEG (NewNode->Name.Ascii, InitVal->Name); + NewNode->DescriptorType = ACPI_DESC_TYPE_NAMED; + NewNode->Type = InitVal->Type; + + if (!PrevNode) + { + AcpiGbl_RootNodeStruct.Child = NewNode; + } + else + { + PrevNode->Peer = NewNode; + } + + NewNode->Parent = &AcpiGbl_RootNodeStruct; + PrevNode = NewNode; + /* * Name entered successfully. If entry in PreDefinedNames[] specifies * an initial value, create the initial value. @@ -286,7 +322,7 @@ AcpiNsRootInitialize ( NewNode->Value = ObjDesc->Method.ParamCount; #else - /* Mark this as a very SPECIAL method */ + /* Mark this as a very SPECIAL method (_OSI) */ ObjDesc->Method.InfoFlags = ACPI_METHOD_INTERNAL_ONLY; ObjDesc->Method.Dispatch.Implementation = AcpiUtOsiImplementation; @@ -358,7 +394,6 @@ AcpiNsRootInitialize ( AcpiUtRemoveReference (ObjDesc); } } - UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); Modified: head/sys/contrib/dev/acpica/components/namespace/nseval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nseval.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/namespace/nseval.c Thu Aug 15 17:43:36 2019 (r351095) @@ -160,14 +160,7 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME ("nseval") -/* Local prototypes */ -static void -AcpiNsExecModuleCode ( - ACPI_OPERAND_OBJECT *MethodObj, - ACPI_EVALUATE_INFO *Info); - - /******************************************************************************* * * FUNCTION: AcpiNsEvaluate @@ -464,207 +457,4 @@ Cleanup: ACPI_FREE (Info->FullPathname); Info->FullPathname = NULL; return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiNsExecModuleCodeList - * - * PARAMETERS: None - * - * RETURN: None. Exceptions during method execution are ignored, since - * we cannot abort a table load. - * - * DESCRIPTION: Execute all elements of the global module-level code list. - * Each element is executed as a single control method. - * - * NOTE: With this option enabled, each block of detected executable AML - * code that is outside of any control method is wrapped with a temporary - * control method object and placed on a global list. The methods on this - * list are executed below. - * - * This function executes the module-level code for all tables only after - * all of the tables have been loaded. It is a legacy option and is - * not compatible with other ACPI implementations. See AcpiNsLoadTable. - * - * This function will be removed when the legacy option is removed. - * - ******************************************************************************/ - -void -AcpiNsExecModuleCodeList ( - void) -{ - ACPI_OPERAND_OBJECT *Prev; - ACPI_OPERAND_OBJECT *Next; - ACPI_EVALUATE_INFO *Info; - UINT32 MethodCount = 0; - - - ACPI_FUNCTION_TRACE (NsExecModuleCodeList); - - - /* Exit now if the list is empty */ - - Next = AcpiGbl_ModuleCodeList; - if (!Next) - { - ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, - "Legacy MLC block list is empty\n")); - - return_VOID; - } - - /* Allocate the evaluation information block */ - - Info = ACPI_ALLOCATE (sizeof (ACPI_EVALUATE_INFO)); - if (!Info) - { - return_VOID; - } - - /* Walk the list, executing each "method" */ - - while (Next) - { - Prev = Next; - Next = Next->Method.Mutex; - - /* Clear the link field and execute the method */ - - Prev->Method.Mutex = NULL; - AcpiNsExecModuleCode (Prev, Info); - MethodCount++; - - /* Delete the (temporary) method object */ - - AcpiUtRemoveReference (Prev); - } - - ACPI_INFO (( - "Executed %u blocks of module-level executable AML code", - MethodCount)); - - ACPI_FREE (Info); - AcpiGbl_ModuleCodeList = NULL; - return_VOID; -} - - -/******************************************************************************* - * - * FUNCTION: AcpiNsExecModuleCode - * - * PARAMETERS: MethodObj - Object container for the module-level code - * Info - Info block for method evaluation - * - * RETURN: None. Exceptions during method execution are ignored, since - * we cannot abort a table load. - * - * DESCRIPTION: Execute a control method containing a block of module-level - * executable AML code. The control method is temporarily - * installed to the root node, then evaluated. - * - ******************************************************************************/ - -static void -AcpiNsExecModuleCode ( - ACPI_OPERAND_OBJECT *MethodObj, - ACPI_EVALUATE_INFO *Info) -{ - ACPI_OPERAND_OBJECT *ParentObj; - ACPI_NAMESPACE_NODE *ParentNode; - ACPI_OBJECT_TYPE Type; - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (NsExecModuleCode); - - - /* - * Get the parent node. We cheat by using the NextObject field - * of the method object descriptor. - */ - ParentNode = ACPI_CAST_PTR ( - ACPI_NAMESPACE_NODE, MethodObj->Method.NextObject); - Type = AcpiNsGetType (ParentNode); - - /* - * Get the region handler and save it in the method object. We may need - * this if an operation region declaration causes a _REG method to be run. - * - * We can't do this in AcpiPsLinkModuleCode because - * AcpiGbl_RootNode->Object is NULL at PASS1. - */ - if ((Type == ACPI_TYPE_DEVICE) && ParentNode->Object) - { - MethodObj->Method.Dispatch.Handler = - ParentNode->Object->Device.Handler; - } - - /* Must clear NextObject (AcpiNsAttachObject needs the field) */ - - MethodObj->Method.NextObject = NULL; - - /* Initialize the evaluation information block */ - - memset (Info, 0, sizeof (ACPI_EVALUATE_INFO)); - Info->PrefixNode = ParentNode; - - /* - * Get the currently attached parent object. Add a reference, - * because the ref count will be decreased when the method object - * is installed to the parent node. - */ - ParentObj = AcpiNsGetAttachedObject (ParentNode); - if (ParentObj) - { - AcpiUtAddReference (ParentObj); - } - - /* Install the method (module-level code) in the parent node */ - - Status = AcpiNsAttachObject (ParentNode, MethodObj, ACPI_TYPE_METHOD); - if (ACPI_FAILURE (Status)) - { - goto Exit; - } - - /* Execute the parent node as a control method */ - - Status = AcpiNsEvaluate (Info); - - ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, - "Executed module-level code at %p\n", - MethodObj->Method.AmlStart)); - - /* Delete a possible implicit return value (in slack mode) */ - - if (Info->ReturnObject) - { - AcpiUtRemoveReference (Info->ReturnObject); - } - - /* Detach the temporary method object */ - - AcpiNsDetachObject (ParentNode); - - /* Restore the original parent object */ - - if (ParentObj) - { - Status = AcpiNsAttachObject (ParentNode, ParentObj, Type); - } - else - { - ParentNode->Type = (UINT8) Type; - } - -Exit: - if (ParentObj) - { - AcpiUtRemoveReference (ParentObj); - } - return_VOID; } Modified: head/sys/contrib/dev/acpica/components/namespace/nsinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsinit.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/namespace/nsinit.c Thu Aug 15 17:43:36 2019 (r351095) @@ -212,29 +212,30 @@ AcpiNsInitializeObjects ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Starting initialization of namespace objects ****\n")); ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - "Completing Region/Field/Buffer/Package initialization:\n")); + "Final data object initialization: ")); - /* Set all init info to zero */ + /* Clear the info block */ memset (&Info, 0, sizeof (ACPI_INIT_WALK_INFO)); /* Walk entire namespace from the supplied root */ + /* + * TBD: will become ACPI_TYPE_PACKAGE as this type object + * is now the only one that supports deferred initialization + * (forward references). + */ Status = AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL, - &Info, NULL); + ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL, &Info, NULL); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace")); } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - " Initialized %u/%u Regions %u/%u Fields %u/%u " - "Buffers %u/%u Packages (%u nodes)\n", - Info.OpRegionInit, Info.OpRegionCount, - Info.FieldInit, Info.FieldCount, - Info.BufferInit, Info.BufferCount, - Info.PackageInit, Info.PackageCount, Info.ObjectCount)); + "Namespace contains %u (0x%X) objects\n", + Info.ObjectCount, + Info.ObjectCount)); ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "%u Control Methods found\n%u Op Regions found\n", @@ -561,35 +562,19 @@ AcpiNsInitOneObject ( AcpiExEnterInterpreter (); /* - * Each of these types can contain executable AML code within the - * declaration. + * Only initialization of Package objects can be deferred, in order + * to support forward references. */ switch (Type) { - case ACPI_TYPE_REGION: + case ACPI_TYPE_LOCAL_BANK_FIELD: - Info->OpRegionInit++; - Status = AcpiDsGetRegionArguments (ObjDesc); - break; + /* TBD: BankFields do not require deferred init, remove this code */ - case ACPI_TYPE_BUFFER_FIELD: - Info->FieldInit++; - Status = AcpiDsGetBufferFieldArguments (ObjDesc); - break; - - case ACPI_TYPE_LOCAL_BANK_FIELD: - - Info->FieldInit++; Status = AcpiDsGetBankFieldArguments (ObjDesc); break; - case ACPI_TYPE_BUFFER: - - Info->BufferInit++; - Status = AcpiDsGetBufferArguments (ObjDesc); - break; - case ACPI_TYPE_PACKAGE: /* Complete the initialization/resolution of the package object */ @@ -600,8 +585,12 @@ AcpiNsInitOneObject ( default: - /* No other types can get here */ + /* No other types should get here */ + Status = AE_TYPE; + ACPI_EXCEPTION ((AE_INFO, Status, + "Opcode is not deferred [%4.4s] (%s)", + AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Type))); break; } Modified: head/sys/contrib/dev/acpica/components/namespace/nsload.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsload.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/namespace/nsload.c Thu Aug 15 17:43:36 2019 (r351095) @@ -268,18 +268,6 @@ Unlock: ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Completed Table Object Initialization\n")); - /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. - */ - AcpiNsExecModuleCodeList (); return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/components/namespace/nsutils.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsutils.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/namespace/nsutils.c Thu Aug 15 17:43:36 2019 (r351095) @@ -802,23 +802,10 @@ AcpiNsTerminate ( void) { ACPI_STATUS Status; - ACPI_OPERAND_OBJECT *Prev; - ACPI_OPERAND_OBJECT *Next; ACPI_FUNCTION_TRACE (NsTerminate); - - /* Delete any module-level code blocks */ - - Next = AcpiGbl_ModuleCodeList; - while (Next) - { - Prev = Next; - Next = Next->Method.Mutex; - Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */ - AcpiUtRemoveReference (Prev); - } /* * Free the entire namespace -- all nodes and all objects Modified: head/sys/contrib/dev/acpica/components/tables/tbdata.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbdata.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/tables/tbdata.c Thu Aug 15 17:43:36 2019 (r351095) @@ -1191,19 +1191,6 @@ AcpiTbLoadTable ( Status = AcpiNsLoadTable (TableIndex, ParentNode); /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. - */ - AcpiNsExecModuleCodeList (); - - /* * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is * responsible for discovering any new wake GPEs by running _PRW methods * that may have been loaded by this table. Modified: head/sys/contrib/dev/acpica/components/tables/tbxfload.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbxfload.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/tables/tbxfload.c Thu Aug 15 17:43:36 2019 (r351095) @@ -479,6 +479,13 @@ AcpiLoadTable ( ACPI_INFO (("Host-directed Dynamic ACPI Table Load:")); Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table), ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex); + if (ACPI_SUCCESS (Status)) + { + /* Complete the initialization/resolution of new objects */ + + AcpiNsInitializeObjects (); + } + return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/components/utilities/utinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utinit.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/utilities/utinit.c Thu Aug 15 17:43:36 2019 (r351095) @@ -342,7 +342,6 @@ AcpiUtInitGlobals ( /* Namespace */ - AcpiGbl_ModuleCodeList = NULL; AcpiGbl_RootNode = NULL; AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME; AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED; Modified: head/sys/contrib/dev/acpica/components/utilities/utxfinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utxfinit.c Thu Aug 15 17:40:48 2019 (r351094) +++ head/sys/contrib/dev/acpica/components/utilities/utxfinit.c Thu Aug 15 17:43:36 2019 (r351095) @@ -381,24 +381,17 @@ AcpiInitializeObjects ( ACPI_FUNCTION_TRACE (AcpiInitializeObjects); +#ifdef ACPI_OBSOLETE_BEHAVIOR /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. + * 05/2019: Removed, initialization now happens at both object + * creation and table load time */ - AcpiNsExecModuleCodeList (); /* * Initialize the objects that remain uninitialized. This *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Aug 15 17:59:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7EA0B13EC; Thu, 15 Aug 2019 17:59:22 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468Z2y5RfMz4CQL; Thu, 15 Aug 2019 17:59:22 +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 9A0AB1C439; Thu, 15 Aug 2019 17:59:22 +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 x7FHxMdL060629; Thu, 15 Aug 2019 17:59:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FHxMUB060628; Thu, 15 Aug 2019 17:59:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908151759.x7FHxMUB060628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 17:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351096 - head/stand/i386/pxeldr X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/stand/i386/pxeldr X-SVN-Commit-Revision: 351096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 17:59:22 -0000 Author: emaste Date: Thu Aug 15 17:59:22 2019 New Revision: 351096 URL: https://svnweb.freebsd.org/changeset/base/351096 Log: stand: remove CLANG_NO_IAS from pxeldr Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including pxeldr, so CLANG_NO_IAS was not previously removed for those. In the case of pxeldr the difference is that IAS adds a size override prefix (67h) to three instructions to specify a 32-bit address, even though the two high bytes are zero and the address fits in 16 bits. this wastes three bytes per instruction and causes some additional nop npadding to be required elsewhere in the object, but pxeboot is not size-constrained so it doesn't matter. Sponsored by: The FreeBSD Foundation Modified: head/stand/i386/pxeldr/Makefile Modified: head/stand/i386/pxeldr/Makefile ============================================================================== --- head/stand/i386/pxeldr/Makefile Thu Aug 15 17:43:36 2019 (r351095) +++ head/stand/i386/pxeldr/Makefile Thu Aug 15 17:59:22 2019 (r351096) @@ -43,6 +43,3 @@ ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} -b ${BTXKERN} ${LOADERBIN} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.pxeldr.S= ${CLANG_NO_IAS} From owner-svn-src-head@freebsd.org Thu Aug 15 18:43:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B9E8B3043; Thu, 15 Aug 2019 18:43: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468b1L34hPz4HLR; Thu, 15 Aug 2019 18:43:02 +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 4B3E21CE0A; Thu, 15 Aug 2019 18:43:02 +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 x7FIh2ow091949; Thu, 15 Aug 2019 18:43:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FIh2VO091948; Thu, 15 Aug 2019 18:43:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908151843.x7FIh2VO091948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Aug 2019 18:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351097 - head/stand/i386/gptzfsboot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/stand/i386/gptzfsboot X-SVN-Commit-Revision: 351097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 18:43:02 -0000 Author: emaste Date: Thu Aug 15 18:43:01 2019 New Revision: 351097 URL: https://svnweb.freebsd.org/changeset/base/351097 Log: gptzfsboot: remove CLANG_NO_IAS Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler did not handle .codeNN directives. Clang gained support quite some time ago, so we can build stand/ with IAS. In some cases there were small differences in generated object output. In the case of gptzfsboot however using GNU as or Clang IAS to assemble gptldr.S resulted in identical final gptzfsboot binary output. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11115 Modified: head/stand/i386/gptzfsboot/Makefile Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Thu Aug 15 17:59:22 2019 (r351096) +++ head/stand/i386/gptzfsboot/Makefile Thu Aug 15 18:43:01 2019 (r351097) @@ -71,6 +71,3 @@ gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o zfsboot.o: ${ZFSSRC}/zfsimpl.c .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.gptldr.S= ${CLANG_NO_IAS} From owner-svn-src-head@freebsd.org Thu Aug 15 18:46:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CEB6B312A; Thu, 15 Aug 2019 18:46:28 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468b5J2RBXz4HX4; Thu, 15 Aug 2019 18:46:28 +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 362FF1CE35; Thu, 15 Aug 2019 18:46:28 +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 x7FIkSha092185; Thu, 15 Aug 2019 18:46:28 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FIkSwL092184; Thu, 15 Aug 2019 18:46:28 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201908151846.x7FIkSwL092184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 15 Aug 2019 18:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351098 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 351098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 18:46:28 -0000 Author: mckusick Date: Thu Aug 15 18:46:27 2019 New Revision: 351098 URL: https://svnweb.freebsd.org/changeset/base/351098 Log: Add missing comma in calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 15 18:43:01 2019 (r351097) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 15 18:46:27 2019 (r351098) @@ -245,7 +245,7 @@ 06/07 Benjamin Close born in Adelaide, Australia, 1978 06/07 Roger Pau Monne born in Reus, Catalunya, Spain, 1986 06/08 Ravi Pokala born in Royal Oak, Michigan, United States, 1980 -06/09 Stanislav Galabov born in Sofia, Bulgaria 1978 +06/09 Stanislav Galabov born in Sofia, Bulgaria, 1978 06/11 Alonso Cardenas Marquez born in Arequipa, Peru, 1979 06/14 Josh Paetzel born in Minneapolis, Minnesota, United States, 1973 06/17 Tilman Linneweh born in Weinheim, Baden-Wuerttemberg, Germany, 1978 From owner-svn-src-head@freebsd.org Thu Aug 15 18:57:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A1B3B35A2; Thu, 15 Aug 2019 18:57:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468bLP1kVTz4J8j; Thu, 15 Aug 2019 18:57:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C7311D022; Thu, 15 Aug 2019 18:57:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FIvmMw098440; Thu, 15 Aug 2019 18:57:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FIvmFh098439; Thu, 15 Aug 2019 18:57:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908151857.x7FIvmFh098439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 15 Aug 2019 18:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351099 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 351099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 18:57:49 -0000 Author: manu Date: Thu Aug 15 18:57:48 2019 New Revision: 351099 URL: https://svnweb.freebsd.org/changeset/base/351099 Log: arm: allwinner: Set aw_ccu to BUS_PASS_BUS In r350842 I've switched the bus pass to resource so it matches the other clock drivers but this cannot work as this drivers is meant to match the dts node '/clocks' and if we don't do it at this pass simplebus is catching this node and we cannot attach. This solve booting on Allwinner boards that are still using /clocks (A20 SoC) MFC after: 3 days Modified: head/sys/arm/allwinner/aw_ccu.c Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Thu Aug 15 18:46:27 2019 (r351098) +++ head/sys/arm/allwinner/aw_ccu.c Thu Aug 15 18:57:48 2019 (r351099) @@ -250,6 +250,6 @@ DEFINE_CLASS_1(aw_ccu, aw_ccu_driver, aw_ccu_methods, static devclass_t aw_ccu_devclass; EARLY_DRIVER_MODULE(aw_ccu, simplebus, aw_ccu_driver, aw_ccu_devclass, - 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); + 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(aw_ccu, 1); From owner-svn-src-head@freebsd.org Thu Aug 15 18:59:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2169DB3667; Thu, 15 Aug 2019 18:59:53 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468bNn015Zz4JJ5; Thu, 15 Aug 2019 18:59:53 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D64891D024; Thu, 15 Aug 2019 18:59:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FIxq7e098580; Thu, 15 Aug 2019 18:59:52 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FIxqNs098579; Thu, 15 Aug 2019 18:59:52 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908151859.x7FIxqNs098579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 15 Aug 2019 18:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351100 - head/sys/dev/iicbus/twsi X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/iicbus/twsi X-SVN-Commit-Revision: 351100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 18:59:53 -0000 Author: manu Date: Thu Aug 15 18:59:52 2019 New Revision: 351100 URL: https://svnweb.freebsd.org/changeset/base/351100 Log: twsi: Fix build when DEBUG is used on 32bits arch. MFC after: 3 days Modified: head/sys/dev/iicbus/twsi/twsi.c Modified: head/sys/dev/iicbus/twsi/twsi.c ============================================================================== --- head/sys/dev/iicbus/twsi/twsi.c Thu Aug 15 18:57:48 2019 (r351099) +++ head/sys/dev/iicbus/twsi/twsi.c Thu Aug 15 18:59:52 2019 (r351100) @@ -261,7 +261,7 @@ twsi_calc_baud_rate(struct twsi_softc *sc, const u_int if (clk_get_freq(sc->clk_core, &clk) < 0) return (-1); - debugf(sc->dev, "Bus clock is at %lu\n", clk); + debugf(sc->dev, "Bus clock is at %ju\n", clk); for (n = 0; n < 8; n++) { for (m = 0; m < 16; m++) { From owner-svn-src-head@freebsd.org Thu Aug 15 19:27:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47266B406B; Thu, 15 Aug 2019 19:27:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468c0n1Brmz4KjN; Thu, 15 Aug 2019 19:27:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AAFC1D5DA; Thu, 15 Aug 2019 19:27:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FJRacn016698; Thu, 15 Aug 2019 19:27:36 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FJRadm016697; Thu, 15 Aug 2019 19:27:36 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908151927.x7FJRadm016697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 19:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351101 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 19:27:37 -0000 Author: asomers Date: Thu Aug 15 19:27:36 2019 New Revision: 351101 URL: https://svnweb.freebsd.org/changeset/base/351101 Log: ping6: fix uninitialized variable warnings when MK_CASPER=no Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21273 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Thu Aug 15 18:59:52 2019 (r351100) +++ head/sbin/ping6/ping6.c Thu Aug 15 19:27:36 2019 (r351101) @@ -961,6 +961,7 @@ main(int argc, char *argv[]) } /* From now on we will use only reverse DNS lookups. */ +#ifdef WITH_CASPER if (capdns != NULL) { const char *types[1]; @@ -968,7 +969,7 @@ main(int argc, char *argv[]) if (cap_dns_type_limit(capdns, types, nitems(types)) < 0) err(1, "unable to limit access to system.dns service"); } - +#endif if (!(options & F_SRCADDR)) { /* * get the source address. XXX since we revoked the root @@ -2780,9 +2781,10 @@ static cap_channel_t * capdns_setup(void) { cap_channel_t *capcas, *capdnsloc; +#ifdef WITH_CASPER const char *types[2]; int families[1]; - +#endif capcas = cap_init(); if (capcas == NULL) err(1, "unable to create casper process"); @@ -2791,6 +2793,7 @@ capdns_setup(void) cap_close(capcas); if (capdnsloc == NULL) err(1, "unable to open system.dns service"); +#ifdef WITH_CASPER types[0] = "NAME2ADDR"; types[1] = "ADDR2NAME"; if (cap_dns_type_limit(capdnsloc, types, nitems(types)) < 0) @@ -2798,6 +2801,6 @@ capdns_setup(void) families[0] = AF_INET6; if (cap_dns_family_limit(capdnsloc, families, nitems(families)) < 0) err(1, "unable to limit access to system.dns service"); - +#endif return (capdnsloc); } From owner-svn-src-head@freebsd.org Thu Aug 15 19:52:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4567B4D54; Thu, 15 Aug 2019 19:52:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468cYY3vfPz4MJ0; Thu, 15 Aug 2019 19:52:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68C8B1DB62; Thu, 15 Aug 2019 19:52:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FJqXP7034175; Thu, 15 Aug 2019 19:52:33 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FJqXVt034174; Thu, 15 Aug 2019 19:52:33 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908151952.x7FJqXVt034174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 15 Aug 2019 19:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351102 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 19:52:33 -0000 Author: asomers Date: Thu Aug 15 19:52:32 2019 New Revision: 351102 URL: https://svnweb.freebsd.org/changeset/base/351102 Log: ping6: Fix alignment errors This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21217 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Thu Aug 15 19:27:36 2019 (r351101) +++ head/sbin/ping6/ping6.c Thu Aug 15 19:52:32 2019 (r351102) @@ -313,7 +313,8 @@ main(int argc, char *argv[]) int sockbufsize = 0; #endif int usepktinfo = 0; - struct in6_pktinfo *pktinfo = NULL; + struct in6_pktinfo pktinfo; + char *cmsg_pktinfo = NULL; struct ip6_rthdr *rthdr = NULL; #ifdef IPSEC_POLICY_IPSEC char *policy_in = NULL; @@ -332,6 +333,7 @@ main(int argc, char *argv[]) /* just to be sure */ memset(&smsghdr, 0, sizeof(smsghdr)); memset(&smsgiov, 0, sizeof(smsgiov)); + memset(&pktinfo, 0, sizeof(pktinfo)); intvl.tv_sec = interval / 1000; intvl.tv_nsec = interval % 1000 * 1000000; @@ -896,11 +898,10 @@ main(int argc, char *argv[]) errx(1, "can't allocate enough memory"); smsghdr.msg_control = (caddr_t)scmsg; smsghdr.msg_controllen = ip6optlen; - scmsgp = (struct cmsghdr *)scmsg; + scmsgp = CMSG_FIRSTHDR(&smsghdr); } if (usepktinfo) { - pktinfo = (struct in6_pktinfo *)(CMSG_DATA(scmsgp)); - memset(pktinfo, 0, sizeof(*pktinfo)); + cmsg_pktinfo = CMSG_DATA(scmsgp); scmsgp->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); scmsgp->cmsg_level = IPPROTO_IPV6; scmsgp->cmsg_type = IPV6_PKTINFO; @@ -911,7 +912,7 @@ main(int argc, char *argv[]) if (ifname) { #ifndef USE_SIN6_SCOPE_ID /* pktinfo must have already been allocated */ - if ((pktinfo->ipi6_ifindex = if_nametoindex(ifname)) == 0) + if ((pktinfo.ipi6_ifindex = if_nametoindex(ifname)) == 0) errx(1, "%s: invalid interface name", ifname); #else if ((dst.sin6_scope_id = if_nametoindex(ifname)) == 0) @@ -922,7 +923,7 @@ main(int argc, char *argv[]) scmsgp->cmsg_len = CMSG_LEN(sizeof(int)); scmsgp->cmsg_level = IPPROTO_IPV6; scmsgp->cmsg_type = IPV6_HOPLIMIT; - *(int *)(CMSG_DATA(scmsgp)) = hoplimit; + memcpy(CMSG_DATA(scmsgp), &hoplimit, sizeof(hoplimit)); scmsgp = CMSG_NXTHDR(&smsghdr, scmsgp); } @@ -986,9 +987,9 @@ main(int argc, char *argv[]) src.sin6_port = ntohs(DUMMY_PORT); src.sin6_scope_id = dst.sin6_scope_id; - if (pktinfo && + if (usepktinfo && setsockopt(dummy, IPPROTO_IPV6, IPV6_PKTINFO, - (void *)pktinfo, sizeof(*pktinfo))) + (void *)&pktinfo, sizeof(pktinfo))) err(1, "UDP setsockopt(IPV6_PKTINFO)"); if (hoplimit != -1 && @@ -1015,6 +1016,10 @@ main(int argc, char *argv[]) close(dummy); } + /* Save pktinfo in the ancillary data. */ + if (usepktinfo) + memcpy(cmsg_pktinfo, &pktinfo, sizeof(pktinfo)); + if (connect(ssend, (struct sockaddr *)&dst, sizeof(dst)) != 0) err(1, "connect() ssend"); @@ -1310,6 +1315,8 @@ pinger(void) CLR(seq % mx_dup_ck); if (options & F_FQDN) { + uint16_t s; + icp->icmp6_type = ICMP6_NI_QUERY; icp->icmp6_code = ICMP6_NI_SUBJ_IPV6; nip->ni_qtype = htons(NI_QTYPE_FQDN); @@ -1317,13 +1324,15 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); + s = htons(seq); + memcpy(nip->icmp6_ni_nonce, &s, sizeof(s)); memcpy(&outpack[ICMP6_NIQLEN], &dst.sin6_addr, sizeof(dst.sin6_addr)); cc = ICMP6_NIQLEN + sizeof(dst.sin6_addr); datalen = 0; } else if (options & F_FQDNOLD) { + uint16_t s; /* packet format in 03 draft - no Subject data on queries */ icp->icmp6_type = ICMP6_NI_QUERY; icp->icmp6_code = 0; /* code field is always 0 */ @@ -1332,11 +1341,14 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); + s = htons(seq); + memcpy(nip->icmp6_ni_nonce, &s, sizeof(s)); cc = ICMP6_NIQLEN; datalen = 0; } else if (options & F_NODEADDR) { + uint16_t s; + icp->icmp6_type = ICMP6_NI_QUERY; icp->icmp6_code = ICMP6_NI_SUBJ_IPV6; nip->ni_qtype = htons(NI_QTYPE_NODEADDR); @@ -1344,13 +1356,16 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); + s = htons(seq); + memcpy(nip->icmp6_ni_nonce, &s, sizeof(s)); memcpy(&outpack[ICMP6_NIQLEN], &dst.sin6_addr, sizeof(dst.sin6_addr)); cc = ICMP6_NIQLEN + sizeof(dst.sin6_addr); datalen = 0; } else if (options & F_SUPTYPES) { + uint16_t s; + icp->icmp6_type = ICMP6_NI_QUERY; icp->icmp6_code = ICMP6_NI_SUBJ_FQDN; /*empty*/ nip->ni_qtype = htons(NI_QTYPE_SUPTYPES); @@ -1359,7 +1374,9 @@ pinger(void) memcpy(nip->icmp6_ni_nonce, nonce, sizeof(nip->icmp6_ni_nonce)); - *(u_int16_t *)nip->icmp6_ni_nonce = htons(seq); + s = htons(seq); + memcpy(nip->icmp6_ni_nonce, &s, sizeof(s)); + cc = ICMP6_NIQLEN; datalen = 0; } else { @@ -1369,17 +1386,17 @@ pinger(void) icp->icmp6_seq = htons(seq); if (timing) { struct timespec tv; - struct tv32 *tv32; + struct tv32 tv32; (void)clock_gettime(CLOCK_MONOTONIC, &tv); - tv32 = (struct tv32 *)&outpack[ICMP6ECHOLEN]; /* * Truncate seconds down to 32 bits in order * to fit the timestamp within 8 bytes of the * packet. We're only concerned with * durations, not absolute times. */ - tv32->tv32_sec = (uint32_t)htonl(tv.tv_sec); - tv32->tv32_nsec = (uint32_t)htonl(tv.tv_nsec); + tv32.tv32_sec = (uint32_t)htonl(tv.tv_sec); + tv32.tv32_nsec = (uint32_t)htonl(tv.tv_nsec); + memcpy(&outpack[ICMP6ECHOLEN], &tv32, sizeof(tv32)); } cc = ICMP6ECHOLEN + datalen; } @@ -1509,7 +1526,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) u_char *cp = NULL, *dp, *end = buf + cc; struct in6_pktinfo *pktinfo = NULL; struct timespec tv, tp; - struct tv32 *tpp; + struct tv32 tpp; double triptime = 0; int dupflag; size_t off; @@ -1554,9 +1571,9 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) seq = ntohs(icp->icmp6_seq); ++nreceived; if (timing) { - tpp = (struct tv32 *)(icp + 1); - tp.tv_sec = ntohl(tpp->tv32_sec); - tp.tv_nsec = ntohl(tpp->tv32_nsec); + memcpy(&tpp, icp + 1, sizeof(tpp)); + tp.tv_sec = ntohl(tpp.tv32_sec); + tp.tv_nsec = ntohl(tpp.tv32_nsec); timespecsub(&tv, &tp, &tv); triptime = ((double)tv.tv_sec) * 1000.0 + ((double)tv.tv_nsec) / 1000000.0; @@ -1620,7 +1637,8 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) } } } else if (icp->icmp6_type == ICMP6_NI_REPLY && mynireply(ni)) { - seq = ntohs(*(u_int16_t *)ni->icmp6_ni_nonce); + memcpy(&seq, ni->icmp6_ni_nonce, sizeof(seq)); + seq = ntohs(seq); ++nreceived; if (TST(seq % mx_dup_ck)) { ++nrepeats; @@ -1698,6 +1716,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) } } if (options & F_VERBOSE) { + u_long t; int32_t ttl; int comma = 0; @@ -1720,7 +1739,8 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) putchar(')'); goto fqdnend; } - ttl = (int32_t)ntohl(*(u_long *)&buf[off+ICMP6ECHOLEN+8]); + memcpy(&t, &buf[off+ICMP6ECHOLEN+8], sizeof(t)); + ttl = (int32_t)ntohl(t); if (comma) printf(","); if (!(ni->ni_flags & NI_FQDN_FLAG_VALIDTTL)) { @@ -2086,8 +2106,10 @@ pr_nodeaddr(struct icmp6_nodeinfo *ni, int nilen) u_int32_t ttl = 0; if (withttl) { - /* XXX: alignment? */ - ttl = (u_int32_t)ntohl(*(u_int32_t *)cp); + uint32_t t; + + memcpy(&t, cp, sizeof(t)); + ttl = (u_int32_t)ntohl(t); cp += sizeof(u_int32_t); nilen -= sizeof(u_int32_t); } @@ -2126,8 +2148,12 @@ get_hoplim(struct msghdr *mhdr) if (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_HOPLIMIT && - cm->cmsg_len == CMSG_LEN(sizeof(int))) - return(*(int *)CMSG_DATA(cm)); + cm->cmsg_len == CMSG_LEN(sizeof(int))) { + int r; + + memcpy(&r, CMSG_DATA(cm), sizeof(r)); + return(r); + } } return(-1); @@ -2136,6 +2162,7 @@ get_hoplim(struct msghdr *mhdr) static struct in6_pktinfo * get_rcvpktinfo(struct msghdr *mhdr) { + static struct in6_pktinfo pi; struct cmsghdr *cm; for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(mhdr); cm; @@ -2145,8 +2172,10 @@ get_rcvpktinfo(struct msghdr *mhdr) if (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_PKTINFO && - cm->cmsg_len == CMSG_LEN(sizeof(struct in6_pktinfo))) - return((struct in6_pktinfo *)CMSG_DATA(cm)); + cm->cmsg_len == CMSG_LEN(sizeof(struct in6_pktinfo))) { + memcpy(&pi, CMSG_DATA(cm), sizeof(pi)); + return(&pi); + } } return(NULL); @@ -2157,7 +2186,7 @@ get_pathmtu(struct msghdr *mhdr) { #ifdef IPV6_RECVPATHMTU struct cmsghdr *cm; - struct ip6_mtuinfo *mtuctl = NULL; + struct ip6_mtuinfo mtuctl; for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(mhdr); cm; cm = (struct cmsghdr *)CMSG_NXTHDR(mhdr, cm)) { @@ -2167,7 +2196,7 @@ get_pathmtu(struct msghdr *mhdr) if (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_PATHMTU && cm->cmsg_len == CMSG_LEN(sizeof(struct ip6_mtuinfo))) { - mtuctl = (struct ip6_mtuinfo *)CMSG_DATA(cm); + memcpy(&mtuctl, CMSG_DATA(cm), sizeof(mtuctl)); /* * If the notified destination is different from @@ -2177,17 +2206,17 @@ get_pathmtu(struct msghdr *mhdr) * have used the default scope zone ID for sending, * in which case the scope ID value is 0. */ - if (!IN6_ARE_ADDR_EQUAL(&mtuctl->ip6m_addr.sin6_addr, + if (!IN6_ARE_ADDR_EQUAL(&mtuctl.ip6m_addr.sin6_addr, &dst.sin6_addr) || - (mtuctl->ip6m_addr.sin6_scope_id && + (mtuctl.ip6m_addr.sin6_scope_id && dst.sin6_scope_id && - mtuctl->ip6m_addr.sin6_scope_id != + mtuctl.ip6m_addr.sin6_scope_id != dst.sin6_scope_id)) { if ((options & F_VERBOSE) != 0) { printf("path MTU for %s is notified. " "(ignored)\n", - pr_addr((struct sockaddr *)&mtuctl->ip6m_addr, - sizeof(mtuctl->ip6m_addr))); + pr_addr((struct sockaddr *)&mtuctl.ip6m_addr, + sizeof(mtuctl.ip6m_addr))); } return(0); } @@ -2196,11 +2225,11 @@ get_pathmtu(struct msghdr *mhdr) * Ignore an invalid MTU. XXX: can we just believe * the kernel check? */ - if (mtuctl->ip6m_mtu < IPV6_MMTU) + if (mtuctl.ip6m_mtu < IPV6_MMTU) return(0); /* notification for our destination. return the MTU. */ - return((int)mtuctl->ip6m_mtu); + return((int)mtuctl.ip6m_mtu); } } #endif @@ -2571,6 +2600,8 @@ pr_retip(struct ip6_hdr *ip6, u_char *end) nh = ip6->ip6_nxt; cp += hlen; while (end - cp >= 8) { + struct ah ah; + switch (nh) { case IPPROTO_HOPOPTS: printf("HBH "); @@ -2595,8 +2626,9 @@ pr_retip(struct ip6_hdr *ip6, u_char *end) #ifdef IPSEC case IPPROTO_AH: printf("AH "); - hlen = (((struct ah *)cp)->ah_len+2) << 2; - nh = ((struct ah *)cp)->ah_nxt; + memcpy(&ah, cp, sizeof(ah)); + hlen = (ah.ah_len+2) << 2; + nh = ah.ah_nxt; break; #endif case IPPROTO_ICMPV6: From owner-svn-src-head@freebsd.org Thu Aug 15 21:51:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71170B75C9; Thu, 15 Aug 2019 21:51:12 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468gBS2Qgcz4Swl; Thu, 15 Aug 2019 21:51:12 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35A0F1EF63; Thu, 15 Aug 2019 21:51:12 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FLpBd2002023; Thu, 15 Aug 2019 21:51:11 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FLpB2c002022; Thu, 15 Aug 2019 21:51:11 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201908152151.x7FLpB2c002022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 15 Aug 2019 21:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351104 - head/lib/libpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmc X-SVN-Commit-Revision: 351104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 21:51:12 -0000 Author: mmacy Date: Thu Aug 15 21:51:11 2019 New Revision: 351104 URL: https://svnweb.freebsd.org/changeset/base/351104 Log: pmc: restore "unhalted-cycles" alias Reported by: mav@ Modified: head/lib/libpmc/libpmc_pmu_util.c Modified: head/lib/libpmc/libpmc_pmu_util.c ============================================================================== --- head/lib/libpmc/libpmc_pmu_util.c Thu Aug 15 21:39:21 2019 (r351103) +++ head/lib/libpmc/libpmc_pmu_util.c Thu Aug 15 21:51:11 2019 (r351104) @@ -69,6 +69,7 @@ static struct pmu_alias pmu_intel_alias_table[] = { {"BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, {"BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, {"cycles", "tsc-tsc"}, + {"unhalted-cycles", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, {"instructions", "inst-retired.any_p"}, {"branch-mispredicts", "br_misp_retired.all_branches"}, {"branches", "br_inst_retired.all_branches"}, From owner-svn-src-head@freebsd.org Thu Aug 15 22:56:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8E0CB9116; Thu, 15 Aug 2019 22:56:00 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468hdD463Vz4Wmf; Thu, 15 Aug 2019 22:56:00 +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 6A3D91FBC6; Thu, 15 Aug 2019 22:56:00 +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 x7FMu0Zl042303; Thu, 15 Aug 2019 22:56:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FMu0Zc042302; Thu, 15 Aug 2019 22:56:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908152256.x7FMu0Zc042302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Aug 2019 22:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351105 - in head: share/man/man4 sys/dev/ntb X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/ntb X-SVN-Commit-Revision: 351105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 22:56:00 -0000 Author: mav Date: Thu Aug 15 22:55:59 2019 New Revision: 351105 URL: https://svnweb.freebsd.org/changeset/base/351105 Log: Limit memory window usage in ntb_transport to 256MB. This adds safety net for the case of misconfigured NTB with too big memory window, for which we may be unable to allocate a memory buffer, which does not make much sense for the network interface. While there, fix the code to really work with asymmetric window sizes setup. This makes driver just print warning message on boot instead of hanging if too large memory window is configured. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/share/man/man4/ntb_transport.4 head/sys/dev/ntb/ntb_transport.c Modified: head/share/man/man4/ntb_transport.4 ============================================================================== --- head/share/man/man4/ntb_transport.4 Thu Aug 15 21:51:11 2019 (r351104) +++ head/share/man/man4/ntb_transport.4 Thu Aug 15 22:55:59 2019 (r351105) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2016-2017 Alexander Motin +.\" Copyright (c) 2016-2019 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2017 +.Dd August 15, 2019 .Dt NTB_TRANSPORT 4 .Os .Sh NAME @@ -51,6 +51,10 @@ The following tunables are settable from the .It Va hw.ntb_transport.debug_level Driver debug level. The default value is 0, higher means more verbose. +.It Va hw.ntb_transport.max_mw_size +Limits maximum memory window usage. +Allocation of big physically contiguous memory buffer may be a problem, +while too big buffers makes no much sense for low latency network interface. .It Va hint.ntb_transport. Ns Ar X Ns Va .config Configures a set of the transport consumers, separated by commas. Each consumer can be configured as: "[][:]", where: Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Thu Aug 15 21:51:11 2019 (r351104) +++ head/sys/dev/ntb/ntb_transport.c Thu Aug 15 22:55:59 2019 (r351105) @@ -81,7 +81,7 @@ SYSCTL_UINT(_hw_ntb_transport, OID_AUTO, debug_level, static unsigned transport_mtu = 0x10000; -static uint64_t max_mw_size; +static uint64_t max_mw_size = 256*1024*1024; SYSCTL_UQUAD(_hw_ntb_transport, OID_AUTO, max_mw_size, CTLFLAG_RDTUN, &max_mw_size, 0, "If enabled (non-zero), limit the size of large memory windows. " "Both sides of the NTB MUST set the same value here."); @@ -177,14 +177,17 @@ struct ntb_transport_mw { size_t xlat_align; size_t xlat_align_size; bus_addr_t addr_limit; - /* Tx buff is off vbase / phys_addr */ + /* Tx buff is vbase / phys_addr / tx_size */ caddr_t vbase; - size_t buff_size; - /* Rx buff is off virt_addr / dma_addr */ + size_t tx_size; + /* Rx buff is virt_addr / dma_addr / rx_size */ bus_dma_tag_t dma_tag; bus_dmamap_t dma_map; caddr_t virt_addr; bus_addr_t dma_addr; + size_t rx_size; + /* rx_size increased to size alignment requirements of the hardware. */ + size_t buff_size; }; struct ntb_transport_child { @@ -331,7 +334,7 @@ ntb_transport_attach(device_t dev) struct ntb_transport_child **cpp = &nt->child; struct ntb_transport_child *nc; struct ntb_transport_mw *mw; - uint64_t db_bitmap, size; + uint64_t db_bitmap; int rc, i, db_count, spad_count, qp, qpu, qpo, qpt; char cfg[128] = ""; char buf[32]; @@ -374,6 +377,14 @@ ntb_transport_attach(device_t dev) if (rc != 0) goto err; + mw->tx_size = mw->phys_size; + if (max_mw_size != 0 && mw->tx_size > max_mw_size) { + device_printf(dev, "Memory window %d limited from " + "%ju to %ju\n", i, mw->phys_size, max_mw_size); + mw->tx_size = max_mw_size; + } + + mw->rx_size = 0; mw->buff_size = 0; mw->virt_addr = NULL; mw->dma_addr = 0; @@ -388,10 +399,7 @@ ntb_transport_attach(device_t dev) * that NTB windows are symmetric and this allocation remain, * but even if not, we will just reallocate it later. */ - size = mw->phys_size; - if (max_mw_size != 0 && size > max_mw_size) - size = max_mw_size; - ntb_set_mw(nt, i, size); + ntb_set_mw(nt, i, mw->tx_size); } qpu = 0; @@ -556,7 +564,7 @@ ntb_transport_init_queue(struct ntb_transport_ctx *nt, struct ntb_transport_mw *mw; struct ntb_transport_qp *qp; vm_paddr_t mw_base; - uint64_t mw_size, qp_offset; + uint64_t qp_offset; size_t tx_size; unsigned num_qps_mw, mw_num, mw_count; @@ -578,9 +586,8 @@ ntb_transport_init_queue(struct ntb_transport_ctx *nt, num_qps_mw = nt->qp_count / mw_count; mw_base = mw->phys_addr; - mw_size = mw->phys_size; - tx_size = mw_size / num_qps_mw; + tx_size = mw->tx_size / num_qps_mw; qp_offset = tx_size * (qp_num / mw_count); qp->tx_mw = mw->vbase + qp_offset; @@ -1103,11 +1110,7 @@ ntb_transport_link_work(void *arg) /* send the local info, in the opposite order of the way we read it */ for (i = 0; i < nt->mw_count; i++) { - size = nt->mw_vec[i].phys_size; - - if (max_mw_size != 0 && size > max_mw_size) - size = max_mw_size; - + size = nt->mw_vec[i].tx_size; ntb_peer_spad_write(dev, NTBT_MW0_SZ_HIGH + (i * 2), size >> 32); ntb_peer_spad_write(dev, NTBT_MW0_SZ_LOW + (i * 2), size); @@ -1139,6 +1142,7 @@ ntb_transport_link_work(void *arg) val64 |= val; mw = &nt->mw_vec[i]; + mw->rx_size = val64; val64 = roundup(val64, mw->xlat_align_size); if (mw->buff_size != val64) { @@ -1288,7 +1292,7 @@ ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt else num_qps_mw = nt->qp_count / mw_count; - rx_size = mw->buff_size / num_qps_mw; + rx_size = mw->rx_size / num_qps_mw; qp->rx_buff = mw->virt_addr + rx_size * (qp_num / mw_count); rx_size -= sizeof(struct ntb_rx_info); From owner-svn-src-head@freebsd.org Thu Aug 15 23:21:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE2D4B9CBB; Thu, 15 Aug 2019 23:21:41 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468jBs62VCz4Xvl; Thu, 15 Aug 2019 23:21:41 +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 B1206200C3; Thu, 15 Aug 2019 23:21:41 +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 x7FNLfM4055909; Thu, 15 Aug 2019 23:21:41 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FNLfQW055908; Thu, 15 Aug 2019 23:21:41 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201908152321.x7FNLfQW055908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 15 Aug 2019 23:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351106 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 351106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 23:21:42 -0000 Author: rmacklem Date: Thu Aug 15 23:21:41 2019 New Revision: 351106 URL: https://svnweb.freebsd.org/changeset/base/351106 Log: Fix copy_file_range(2) so that unneeded blocks are not allocated to the output file. When the byte range for copy_file_range(2) doesn't go to EOF on the output file and there is a hole in the input file, a hole must be "punched" in the output file. This is done by writing a block of bytes all set to 0. Without this patch, the write is done unconditionally which means that, if the output file already has a hole in that byte range, a unneeded data block of all 0 bytes would be allocated. This patch adds code to check for a hole in the output file, so that it can skip doing the write if there is already a hole in that byte range of the output file. This avoids unnecessary allocation of blocks to the output file. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D21155 Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Aug 15 22:55:59 2019 (r351105) +++ head/sys/kern/vfs_vnops.c Thu Aug 15 23:21:41 2019 (r351106) @@ -2713,18 +2713,92 @@ mem_iszero(void *dat, int len) } /* + * Look for a hole in the output file and, if found, adjust *outoffp + * and *xferp to skip past the hole. + * *xferp is the entire hole length to be written and xfer2 is how many bytes + * to be written as 0's upon return. + */ +static off_t +vn_skip_hole(struct vnode *outvp, off_t xfer2, off_t *outoffp, off_t *xferp, + off_t *dataoffp, off_t *holeoffp, struct ucred *cred) +{ + int error; + off_t delta; + + if (*holeoffp == 0 || *holeoffp <= *outoffp) { + *dataoffp = *outoffp; + error = VOP_IOCTL(outvp, FIOSEEKDATA, dataoffp, 0, cred, + curthread); + if (error == 0) { + *holeoffp = *dataoffp; + error = VOP_IOCTL(outvp, FIOSEEKHOLE, holeoffp, 0, cred, + curthread); + } + if (error != 0 || *holeoffp == *dataoffp) { + /* + * Since outvp is unlocked, it may be possible for + * another thread to do a truncate(), lseek(), write() + * creating a hole at startoff between the above + * VOP_IOCTL() calls, if the other thread does not do + * rangelocking. + * If that happens, *holeoffp == *dataoffp and finding + * the hole has failed, so disable vn_skip_hole(). + */ + *holeoffp = -1; /* Disable use of vn_skip_hole(). */ + return (xfer2); + } + KASSERT(*dataoffp >= *outoffp, + ("vn_skip_hole: dataoff=%jd < outoff=%jd", + (intmax_t)*dataoffp, (intmax_t)*outoffp)); + KASSERT(*holeoffp > *dataoffp, + ("vn_skip_hole: holeoff=%jd <= dataoff=%jd", + (intmax_t)*holeoffp, (intmax_t)*dataoffp)); + } + + /* + * If there is a hole before the data starts, advance *outoffp and + * *xferp past the hole. + */ + if (*dataoffp > *outoffp) { + delta = *dataoffp - *outoffp; + if (delta >= *xferp) { + /* Entire *xferp is a hole. */ + *outoffp += *xferp; + *xferp = 0; + return (0); + } + *xferp -= delta; + *outoffp += delta; + xfer2 = MIN(xfer2, *xferp); + } + + /* + * If a hole starts before the end of this xfer2, reduce this xfer2 so + * that the write ends at the start of the hole. + * *holeoffp should always be greater than *outoffp, but for the + * non-INVARIANTS case, check this to make sure xfer2 remains a sane + * value. + */ + if (*holeoffp > *outoffp && *holeoffp < *outoffp + xfer2) + xfer2 = *holeoffp - *outoffp; + return (xfer2); +} + +/* * Write an xfer sized chunk to outvp in blksize blocks from dat. * dat is a maximum of blksize in length and can be written repeatedly in * the chunk. * If growfile == true, just grow the file via vn_truncate_locked() instead * of doing actual writes. + * If checkhole == true, a hole is being punched, so skip over any hole + * already in the output file. */ static int vn_write_outvp(struct vnode *outvp, char *dat, off_t outoff, off_t xfer, - u_long blksize, bool growfile, struct ucred *cred) + u_long blksize, bool growfile, bool checkhole, struct ucred *cred) { struct mount *mp; - off_t xfer2; + off_t dataoff, holeoff, xfer2; int error, lckf; /* @@ -2733,7 +2807,24 @@ vn_write_outvp(struct vnode *outvp, char *dat, off_t o * done for each iteration, since the xfer argument can be very * large if there is a large hole to punch in the output file. */ + error = 0; + holeoff = 0; do { + xfer2 = MIN(xfer, blksize); + if (checkhole) { + /* + * Punching a hole. Skip writing if there is + * already a hole in the output file. + */ + xfer2 = vn_skip_hole(outvp, xfer2, &outoff, &xfer, + &dataoff, &holeoff, cred); + if (xfer == 0) + break; + if (holeoff < 0) + checkhole = false; + KASSERT(xfer2 > 0, ("vn_write_outvp: xfer2=%jd", + (intmax_t)xfer2)); + } bwillwrite(); mp = NULL; error = vn_start_write(outvp, &mp, V_WAIT); @@ -2749,7 +2840,6 @@ vn_write_outvp(struct vnode *outvp, char *dat, off_t o error = vn_truncate_locked(outvp, outoff + xfer, false, cred); else { - xfer2 = MIN(xfer, blksize); error = vn_rdwr(UIO_WRITE, outvp, dat, xfer2, outoff, UIO_SYSSPACE, IO_NODELOCKED, curthread->td_ucred, cred, NULL, curthread); @@ -2916,7 +3006,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * memset(dat, 0, MIN(xfer2, blksize)); error = vn_write_outvp(outvp, dat, *outoffp, xfer2, blksize, false, - outcred); + holeout > 0, outcred); } if (error == 0 && *outoffp + xfer > @@ -2924,7 +3014,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * /* Grow last block. */ error = vn_write_outvp(outvp, dat, *outoffp, xfer, blksize, true, - outcred); + false, outcred); if (error == 0) { *inoffp += xfer; *outoffp += xfer; @@ -2980,7 +3070,8 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * error = vn_write_outvp(outvp, dat, *outoffp, xfer, blksize, readzeros && xfer == len && - *outoffp >= va.va_size, outcred); + *outoffp >= va.va_size, false, + outcred); if (error == 0) { *inoffp += xfer; startoff += xfer; From owner-svn-src-head@freebsd.org Thu Aug 15 23:56:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9892ABA3EA; Thu, 15 Aug 2019 23:56:20 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468jyr3J92z4Ywx; Thu, 15 Aug 2019 23:56:20 +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 4E1642066C; Thu, 15 Aug 2019 23:56:20 +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 x7FNuKAc077687; Thu, 15 Aug 2019 23:56:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FNuKPA077686; Thu, 15 Aug 2019 23:56:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908152356.x7FNuKPA077686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Aug 2019 23:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351107 - head/sys/dev/ntb X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb X-SVN-Commit-Revision: 351107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 15 Aug 2019 23:56:20 -0000 Author: mav Date: Thu Aug 15 23:56:19 2019 New Revision: 351107 URL: https://svnweb.freebsd.org/changeset/base/351107 Log: Fix i386 build. MFC after: 2 weeks Modified: head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Thu Aug 15 23:21:41 2019 (r351106) +++ head/sys/dev/ntb/ntb_transport.c Thu Aug 15 23:56:19 2019 (r351107) @@ -380,7 +380,8 @@ ntb_transport_attach(device_t dev) mw->tx_size = mw->phys_size; if (max_mw_size != 0 && mw->tx_size > max_mw_size) { device_printf(dev, "Memory window %d limited from " - "%ju to %ju\n", i, mw->phys_size, max_mw_size); + "%ju to %ju\n", i, (uintmax_t)mw->phys_size, + max_mw_size); mw->tx_size = max_mw_size; } From owner-svn-src-head@freebsd.org Fri Aug 16 00:45:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 027B8BB7F1; Fri, 16 Aug 2019 00:45:23 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468l3Q70b6z4byB; Fri, 16 Aug 2019 00:45:22 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D356120F6C; Fri, 16 Aug 2019 00:45:22 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7G0jMmE007370; Fri, 16 Aug 2019 00:45:22 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7G0jE3x007325; Fri, 16 Aug 2019 00:45:14 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201908160045.x7G0jE3x007325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 16 Aug 2019 00:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351108 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include i386/i386 i386/include kern mips/atheros mips/atheros/ar531x mips/beri mips/broadcom mips/cavium mips/... X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include arm/arm arm/include arm64/include i386/i386 i386/include kern mips/atheros mips/atheros/ar531x mips/beri mips/broadcom mips/cavium mips/include mips/ingenic mips... X-SVN-Commit-Revision: 351108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 00:45:23 -0000 Author: jeff Date: Fri Aug 16 00:45:14 2019 New Revision: 351108 URL: https://svnweb.freebsd.org/changeset/base/351108 Log: Move phys_avail definition into MI code. It is consumed in the MI layer and doing so adds more flexibility with less redundant code. Reviewed by: jhb, markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21250 Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/pmap.h head/sys/arm/arm/busdma_machdep-v4.c head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/mem.c head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/physmem.c head/sys/arm/include/pmap.h head/sys/arm64/include/pmap.h head/sys/i386/i386/machdep.c head/sys/i386/i386/minidump_machdep_base.c head/sys/i386/include/pmap.h head/sys/kern/kern_dump.c head/sys/mips/atheros/ar531x/ar5315_machdep.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/beri/beri_machdep.c head/sys/mips/broadcom/bcm_machdep.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/include/pmap.h head/sys/mips/ingenic/jz4780_machdep.c head/sys/mips/malta/malta_machdep.c head/sys/mips/mediatek/mtk_machdep.c head/sys/mips/mips/busdma_machdep.c head/sys/mips/mips/machdep.c head/sys/mips/mips/pmap.c head/sys/mips/nlm/xlp_machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/pmap.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/machdep.c head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/riscv/include/pmap.h head/sys/riscv/riscv/machdep.c head/sys/sparc64/include/pmap.h head/sys/sparc64/sparc64/pmap.c head/sys/vm/vm_param.h head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h head/sys/x86/x86/nexus.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/amd64/amd64/machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -210,21 +210,6 @@ int cold = 1; long Maxmem = 0; long realmem = 0; -/* - * The number of PHYSMAP entries must be one less than the number of - * PHYSSEG entries because the PHYSMAP entry that spans the largest - * physical address that is accessible by ISA DMA is split into two - * PHYSSEG entries. - */ -#define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) - -vm_paddr_t phys_avail[PHYSMAP_SIZE + 2]; -vm_paddr_t dump_avail[PHYSMAP_SIZE + 2]; - -/* must be 2 less so 0 0 can signal end of chunks */ -#define PHYS_AVAIL_ARRAY_END (nitems(phys_avail) - 2) -#define DUMP_AVAIL_ARRAY_END (nitems(dump_avail) - 2) - struct kva_md_info kmi; static struct trapframe proc0_tf; @@ -1036,7 +1021,7 @@ add_physmap_entry(uint64_t base, uint64_t length, vm_p physmap_idx += 2; *physmap_idxp = physmap_idx; - if (physmap_idx == PHYSMAP_SIZE) { + if (physmap_idx == PHYS_AVAIL_ENTRIES) { printf( "Too many segments in the physical address map, giving up\n"); return (0); @@ -1229,7 +1214,7 @@ static void getmemsize(caddr_t kmdp, u_int64_t first) { int i, physmap_idx, pa_indx, da_indx; - vm_paddr_t pa, physmap[PHYSMAP_SIZE]; + vm_paddr_t pa, physmap[PHYS_AVAIL_ENTRIES]; u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; quad_t dcons_addr, dcons_size; @@ -1446,7 +1431,7 @@ skip_memtest: phys_avail[pa_indx] += PAGE_SIZE; } else { pa_indx++; - if (pa_indx == PHYS_AVAIL_ARRAY_END) { + if (pa_indx == PHYS_AVAIL_ENTRIES) { printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; @@ -1462,7 +1447,7 @@ do_dump_avail: dump_avail[da_indx] += PAGE_SIZE; } else { da_indx++; - if (da_indx == DUMP_AVAIL_ARRAY_END) { + if (da_indx == PHYS_AVAIL_ENTRIES) { da_indx--; goto do_next; } Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/amd64/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -408,8 +408,6 @@ struct pv_chunk { extern caddr_t CADDR1; extern pt_entry_t *CMAP1; -extern vm_paddr_t phys_avail[]; -extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; extern vm_paddr_t dmaplimit; Modified: head/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v4.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm/arm/busdma_machdep-v4.c Fri Aug 16 00:45:14 2019 (r351108) @@ -70,7 +70,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Aug 16 00:45:14 2019 (r351108) @@ -52,7 +52,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include Modified: head/sys/arm/arm/mem.c ============================================================================== --- head/sys/arm/arm/mem.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm/arm/mem.c Fri Aug 16 00:45:14 2019 (r351108) @@ -62,6 +62,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm/arm/minidump_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -45,13 +45,15 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#include +#include +#include #include #include #include #include #include #include -#include CTASSERT(sizeof(struct kerneldumpheader) == 512); Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm/arm/physmem.c Fri Aug 16 00:45:14 2019 (r351108) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -78,32 +81,6 @@ static size_t hwcnt; static size_t excnt; /* - * These "avail lists" are globals used to communicate physical memory layout to - * other parts of the kernel. Within the arrays, each value is the starting - * address of a contiguous area of physical address space. The values at even - * indexes are areas that contain usable memory and the values at odd indexes - * are areas that aren't usable. Each list is terminated by a pair of zero - * entries. - * - * dump_avail tells the dump code what regions to include in a crash dump, and - * phys_avail is the way we hand all the remaining physical ram we haven't used - * in early kernel init over to the vm system for allocation management. - * - * We size these arrays to hold twice as many available regions as we allow for - * hardware memory regions, to allow for the fact that exclusions can split a - * hardware region into two or more available regions. In the real world there - * will typically be one or two hardware regions and two or three exclusions. - * - * Each available region in this list occupies two array slots (the start of the - * available region and the start of the unavailable region that follows it). - */ -#define MAX_AVAIL_REGIONS (MAX_HWCNT * 2) -#define MAX_AVAIL_ENTRIES (MAX_AVAIL_REGIONS * 2) - -vm_paddr_t phys_avail[MAX_AVAIL_ENTRIES + 2]; /* +2 to allow for a pair */ -vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES + 2]; /* of zeroes to terminate. */ - -/* * realmem is the total number of hardware pages, excluded or not. * Maxmem is one greater than the last physical page number. */ @@ -405,10 +382,10 @@ arm_physmem_init_kernel_globals(void) { size_t nextidx; - regions_to_avail(dump_avail, EXFLAG_NODUMP, MAX_AVAIL_ENTRIES, NULL, + regions_to_avail(dump_avail, EXFLAG_NODUMP, PHYS_AVAIL_ENTRIES, NULL, NULL); nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, - MAX_AVAIL_ENTRIES, &physmem, &realmem); + PHYS_AVAIL_ENTRIES, &physmem, &realmem); if (nextidx == 0) panic("No memory entries in phys_avail"); Maxmem = atop(phys_avail[nextidx - 1]); Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -41,9 +41,6 @@ #ifdef _KERNEL #include -extern vm_paddr_t dump_avail[]; -extern vm_paddr_t phys_avail[]; - extern char *_tmppt; /* poor name! */ extern vm_offset_t virtual_avail; Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/arm64/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -132,9 +132,6 @@ extern struct pmap kernel_pmap_store; #define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx) #define PMAP_UNLOCK(pmap) mtx_unlock(&(pmap)->pm_mtx) -#define PHYS_AVAIL_SIZE 32 -extern vm_paddr_t phys_avail[]; -extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/i386/i386/machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -194,21 +194,6 @@ long realmem = 0; FEATURE(pae, "Physical Address Extensions"); #endif -/* - * The number of PHYSMAP entries must be one less than the number of - * PHYSSEG entries because the PHYSMAP entry that spans the largest - * physical address that is accessible by ISA DMA is split into two - * PHYSSEG entries. - */ -#define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) - -vm_paddr_t phys_avail[PHYSMAP_SIZE + 2]; -vm_paddr_t dump_avail[PHYSMAP_SIZE + 2]; - -/* must be 2 less so 0 0 can signal end of chunks */ -#define PHYS_AVAIL_ARRAY_END (nitems(phys_avail) - 2) -#define DUMP_AVAIL_ARRAY_END (nitems(dump_avail) - 2) - struct kva_md_info kmi; static struct trapframe proc0_tf; @@ -1736,7 +1721,7 @@ add_physmap_entry(uint64_t base, uint64_t length, vm_p physmap_idx += 2; *physmap_idxp = physmap_idx; - if (physmap_idx == PHYSMAP_SIZE) { + if (physmap_idx == PHYS_AVAIL_ENTRIES) { printf( "Too many segments in the physical address map, giving up\n"); return (0); @@ -1823,7 +1808,7 @@ getmemsize(int first) { int has_smap, off, physmap_idx, pa_indx, da_indx; u_long memtest; - vm_paddr_t physmap[PHYSMAP_SIZE]; + vm_paddr_t physmap[PHYS_AVAIL_ENTRIES]; quad_t dcons_addr, dcons_size, physmem_tunable; int hasbrokenint12, i, res; u_int extmem; @@ -2136,7 +2121,7 @@ skip_memtest: phys_avail[pa_indx] += PAGE_SIZE; } else { pa_indx++; - if (pa_indx == PHYS_AVAIL_ARRAY_END) { + if (pa_indx == PHYS_AVAIL_ENTRIES) { printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; @@ -2152,7 +2137,7 @@ do_dump_avail: dump_avail[da_indx] += PAGE_SIZE; } else { da_indx++; - if (da_indx == DUMP_AVAIL_ARRAY_END) { + if (da_indx == PHYS_AVAIL_ENTRIES) { da_indx--; goto do_next; } Modified: head/sys/i386/i386/minidump_machdep_base.c ============================================================================== --- head/sys/i386/i386/minidump_machdep_base.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/i386/i386/minidump_machdep_base.c Fri Aug 16 00:45:14 2019 (r351108) @@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include #include Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/i386/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -234,8 +234,6 @@ struct pv_chunk { #ifdef _KERNEL -extern vm_paddr_t phys_avail[]; -extern vm_paddr_t dump_avail[]; extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: head/sys/kern/kern_dump.c ============================================================================== --- head/sys/kern/kern_dump.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/kern/kern_dump.c Fri Aug 16 00:45:14 2019 (r351108) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include Modified: head/sys/mips/atheros/ar531x/ar5315_machdep.c ============================================================================== --- head/sys/mips/atheros/ar531x/ar5315_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/atheros/ar531x/ar5315_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -42,7 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include @@ -52,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/atheros/ar71xx_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -45,7 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include @@ -55,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/mips/beri/beri_machdep.c ============================================================================== --- head/sys/mips/beri/beri_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/beri/beri_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -65,8 +65,10 @@ __FBSDID("$FreeBSD$"); #endif #include +#include #include #include +#include #include #include Modified: head/sys/mips/broadcom/bcm_machdep.c ============================================================================== --- head/sys/mips/broadcom/bcm_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/broadcom/bcm_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -57,8 +57,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include @@ -73,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/cavium/octeon_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -56,8 +56,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include @@ -73,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -48,7 +48,7 @@ #ifndef _MACHINE_PMAP_H_ #define _MACHINE_PMAP_H_ -#include +#include #include #if defined(__mips_n32) || defined(__mips_n64) /* PHYSADDR_64BIT */ @@ -157,14 +157,10 @@ struct pv_chunk { * so we can describe up to (PHYS_AVAIL_ENTRIES / 2) distinct memory * regions. */ -#define PHYS_AVAIL_ENTRIES 10 -extern vm_paddr_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; -extern vm_paddr_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; +extern vm_paddr_t physmem_desc[PHYS_AVAIL_COUNT]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; - -extern vm_paddr_t dump_avail[PHYS_AVAIL_ENTRIES + 2]; #define pmap_page_get_memattr(m) (((m)->md.pv_flags & PV_MEMATTR_MASK) >> PV_MEMATTR_SHIFT) #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) Modified: head/sys/mips/ingenic/jz4780_machdep.c ============================================================================== --- head/sys/mips/ingenic/jz4780_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/ingenic/jz4780_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -48,7 +48,9 @@ __FBSDID("$FreeBSD$"); #endif #include +#include #include +#include #include @@ -58,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/malta/malta_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -54,8 +54,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include Modified: head/sys/mips/mediatek/mtk_machdep.c ============================================================================== --- head/sys/mips/mediatek/mtk_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/mediatek/mtk_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -54,8 +54,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include @@ -70,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/mips/busdma_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/mips/machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -140,9 +141,7 @@ char pcpu_space[MAXCPU][PAGE_SIZE * 2] \ struct pcpu *pcpup = (struct pcpu *)pcpu_space; -vm_paddr_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; -vm_paddr_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; -vm_paddr_t dump_avail[PHYS_AVAIL_ENTRIES + 2]; +vm_paddr_t physmem_desc[PHYS_AVAIL_COUNT]; #ifdef UNIMPLEMENTED struct platform platform; Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/mips/pmap.c Fri Aug 16 00:45:14 2019 (r351108) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/mips/nlm/xlp_machdep.c ============================================================================== --- head/sys/mips/nlm/xlp_machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/mips/nlm/xlp_machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -56,7 +56,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/aim/mmu_oea.c Fri Aug 16 00:45:14 2019 (r351108) @@ -132,6 +132,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -749,7 +751,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm } while (pa < end); } - if (nitems(phys_avail) < regions_sz) + if (PHYS_AVAIL_ENTRIES < regions_sz) panic("moea_bootstrap: phys_avail too small"); phys_avail_count = 0; Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/aim/mmu_oea64.c Fri Aug 16 00:45:14 2019 (r351108) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -784,7 +785,7 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels mem_regions(&pregions, &pregions_sz, ®ions, ®ions_sz); CTR0(KTR_PMAP, "moea64_bootstrap: physical memory"); - if (nitems(phys_avail) < regions_sz) + if (PHYS_AVAIL_ENTRIES < regions_sz) panic("moea64_bootstrap: phys_avail too small"); phys_avail_count = 0; Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/booke/pmap.c Fri Aug 16 00:45:14 2019 (r351108) @@ -1687,7 +1687,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o mem_regions(&physmem_regions, &physmem_regions_sz, &availmem_regions, &availmem_regions_sz); - if (nitems(phys_avail) < availmem_regions_sz) + if (PHYS_AVAIL_ENTRIES < availmem_regions_sz) panic("mmu_booke_bootstrap: phys_avail too small"); sz = 0; Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -75,6 +75,7 @@ #include #include #include +#include struct pmap; typedef struct pmap *pmap_t; @@ -268,12 +269,6 @@ boolean_t pmap_mmu_install(char *name, int prio); #define vtophys(va) pmap_kextract((vm_offset_t)(va)) -#define PHYS_AVAIL_SZ 256 /* Allows up to 16GB Ram on pSeries with - * logical memory block size of 64MB. - * For more Ram increase the lmb or this value. - */ - -extern vm_paddr_t phys_avail[PHYS_AVAIL_SZ]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/include/vmparam.h Fri Aug 16 00:45:14 2019 (r351108) @@ -154,7 +154,15 @@ struct pmap_physseg { }; #endif -#define VM_PHYSSEG_MAX 16 /* 1? */ +#define VM_PHYSSEG_MAX 16 + +#define PHYS_AVAIL_SZ 256 /* Allows up to 16GB Ram on pSeries with + * logical memory block size of 64MB. + * For more Ram increase the lmb or this value. + */ + +/* XXX This is non-sensical. Phys avail should hold contiguous regions. */ +#define PHYS_AVAIL_ENTRIES PHYS_AVAIL_SZ /* * The physical address space is densely populated on 32-bit systems, Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/powerpc/machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -100,6 +100,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Fri Aug 16 00:45:14 2019 (r351108) @@ -75,7 +75,6 @@ struct pmap kernel_pmap_store; vm_offset_t msgbuf_phys; vm_offset_t kernel_vm_end; -vm_paddr_t phys_avail[PHYS_AVAIL_SZ]; vm_offset_t virtual_avail; vm_offset_t virtual_end; Modified: head/sys/riscv/include/pmap.h ============================================================================== --- head/sys/riscv/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/riscv/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -127,9 +127,6 @@ extern struct pmap kernel_pmap_store; #define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx) #define PMAP_UNLOCK(pmap) mtx_unlock(&(pmap)->pm_mtx) -#define PHYS_AVAIL_SIZE 10 -extern vm_paddr_t phys_avail[]; -extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/riscv/riscv/machdep.c Fri Aug 16 00:45:14 2019 (r351108) @@ -67,9 +67,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include +#include #include #include #include @@ -100,9 +102,6 @@ struct pcpu __pcpu[MAXCPU]; static struct trapframe proc0_tf; -vm_paddr_t phys_avail[PHYS_AVAIL_SIZE + 2]; -vm_paddr_t dump_avail[PHYS_AVAIL_SIZE + 2]; - int early_boot = 1; int cold = 1; long realmem = 0; @@ -110,8 +109,7 @@ long Maxmem = 0; #define DTB_SIZE_MAX (1024 * 1024) -#define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) -vm_paddr_t physmap[PHYSMAP_SIZE]; +vm_paddr_t physmap[PHYS_AVAIL_ENTRIES]; u_int physmap_idx; struct kva_md_info kmi; @@ -707,7 +705,7 @@ add_physmap_entry(uint64_t base, uint64_t length, vm_p _physmap_idx += 2; *physmap_idxp = _physmap_idx; - if (_physmap_idx == PHYSMAP_SIZE) { + if (_physmap_idx == PHYS_AVAIL_ENTRIES) { printf( "Too many segments in the physical address map, giving up\n"); return (0); Modified: head/sys/sparc64/include/pmap.h ============================================================================== --- head/sys/sparc64/include/pmap.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/sparc64/include/pmap.h Fri Aug 16 00:45:14 2019 (r351108) @@ -105,7 +105,6 @@ void pmap_set_kctx(void); extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store) extern struct rwlock_padalign tte_list_global_lock; -extern vm_paddr_t phys_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/sparc64/sparc64/pmap.c Fri Aug 16 00:45:14 2019 (r351108) @@ -102,11 +102,10 @@ __FBSDID("$FreeBSD$"); /* * Map of physical memory reagions */ -vm_paddr_t phys_avail[128]; -static struct ofw_mem_region mra[128]; -struct ofw_mem_region sparc64_memreg[128]; +static struct ofw_mem_region mra[VM_PHYSSEG_MAX]; +struct ofw_mem_region sparc64_memreg[VM_PHYSSEG_MAX]; int sparc64_nmemreg; -static struct ofw_map translations[128]; +static struct ofw_map translations[VM_PHYSSEG_MAX]; static int translations_size; static vm_offset_t pmap_idle_map; @@ -331,7 +330,7 @@ pmap_bootstrap(u_int cpu_impl) OF_panic("%s: finddevice /memory", __func__); if ((sz = OF_getproplen(pmem, "available")) == -1) OF_panic("%s: getproplen /memory/available", __func__); - if (sizeof(phys_avail) < sz) + if (PHYS_AVAIL_ENTRIES < sz) OF_panic("%s: phys_avail too small", __func__); if (sizeof(mra) < sz) OF_panic("%s: mra too small", __func__); Modified: head/sys/vm/vm_param.h ============================================================================== --- head/sys/vm/vm_param.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/vm/vm_param.h Fri Aug 16 00:45:14 2019 (r351108) @@ -126,6 +126,11 @@ struct xswdev { #define KSTACK_MAX_PAGES 32 #endif +#ifndef PHYS_AVAIL_ENTRIES +#define PHYS_AVAIL_ENTRIES (VM_PHYSSEG_MAX * 2) +#endif +#define PHYS_AVAIL_COUNT (PHYS_AVAIL_ENTRIES + 2) + #ifndef ASSEMBLER #ifdef _KERNEL #define num_pages(x) \ Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/vm/vm_phys.c Fri Aug 16 00:45:14 2019 (r351108) @@ -111,6 +111,24 @@ static struct vm_freelist __aligned(CACHE_LINE_SIZE) static int __read_mostly vm_nfreelists; /* + * These "avail lists" are globals used to communicate boot-time physical + * memory layout to other parts of the kernel. Each physically contiguous + * region of memory is defined by a start address at an even index and an + * end address at the following odd index. Each list is terminated by a + * pair of zero entries. + * + * dump_avail tells the dump code what regions to include in a crash dump, and + * phys_avail is all of the remaining physical memory that is available for + * the vm system. + * + * Initially dump_avail and phys_avail are identical. Boot time memory + * allocations remove extents from phys_avail that may still be included + * in dumps. + */ +vm_paddr_t phys_avail[PHYS_AVAIL_COUNT]; +vm_paddr_t dump_avail[PHYS_AVAIL_COUNT]; + +/* * Provides the mapping from VM_FREELIST_* to free list indices (flind). */ static int __read_mostly vm_freelist_to_flind[VM_NFREELIST]; Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/vm/vm_phys.h Fri Aug 16 00:45:14 2019 (r351108) @@ -46,6 +46,9 @@ #define VM_NFREEORDER_MAX VM_NFREEORDER #endif +extern vm_paddr_t phys_avail[]; +extern vm_paddr_t dump_avail[]; + /* Domains must be dense (non-sparse) and zero-based. */ struct mem_affinity { vm_paddr_t start; Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Thu Aug 15 23:56:19 2019 (r351107) +++ head/sys/x86/x86/nexus.c Fri Aug 16 00:45:14 2019 (r351108) @@ -62,8 +62,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include +#include #include #include From owner-svn-src-head@freebsd.org Fri Aug 16 05:06:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E192C0159; Fri, 16 Aug 2019 05:06:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468rsC32fQz3JMs; Fri, 16 Aug 2019 05:06:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45A6F23E75; Fri, 16 Aug 2019 05:06:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7G56tiv062142; Fri, 16 Aug 2019 05:06:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7G56sx5062140; Fri, 16 Aug 2019 05:06:54 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908160506.x7G56sx5062140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 16 Aug 2019 05:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351113 - in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Commit-Revision: 351113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 05:06:55 -0000 Author: asomers Date: Fri Aug 16 05:06:54 2019 New Revision: 351113 URL: https://svnweb.freebsd.org/changeset/base/351113 Log: fusefs: don't send the namespace during listextattr The FUSE_LISTXATTR operation always returns the full list of a file's extended attributes, in all namespaces. There's no way to filter the list server-side. However, currently FreeBSD's fusefs driver sends a namespace string with the FUSE_LISTXATTR request. That behavior was probably copied from fuse_vnop_getextattr, which has an attribute name argument. It's been there ever since extended attribute support was added in r324620. This commit removes it. Reviewed by: cem MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21280 Modified: head/sys/fs/fuse/fuse_vnops.c head/tests/sys/fs/fusefs/mockfs.cc Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Fri Aug 16 04:54:38 2019 (r351112) +++ head/sys/fs/fuse/fuse_vnops.c Fri Aug 16 05:06:54 2019 (r351113) @@ -2246,9 +2246,7 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) struct mount *mp = vnode_mount(vp); struct thread *td = ap->a_td; struct ucred *cred = ap->a_cred; - size_t len; char *prefix; - char *attr_str; char *bsd_list = NULL; char *linux_list; int bsd_list_len; @@ -2274,9 +2272,7 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) else prefix = EXTATTR_NAMESPACE_USER_STRING; - len = strlen(prefix) + sizeof(extattr_namespace_separator) + 1; - - fdisp_init(&fdi, sizeof(*list_xattr_in) + len); + fdisp_init(&fdi, sizeof(*list_xattr_in)); fdisp_make_vp(&fdi, FUSE_LISTXATTR, vp, td, cred); /* @@ -2284,8 +2280,6 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) */ list_xattr_in = fdi.indata; list_xattr_in->size = 0; - attr_str = (char *)fdi.indata + sizeof(*list_xattr_in); - snprintf(attr_str, len, "%s%c", prefix, extattr_namespace_separator); err = fdisp_wait_answ(&fdi); if (err != 0) { @@ -2310,8 +2304,6 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) fdisp_refresh_vp(&fdi, FUSE_LISTXATTR, vp, td, cred); list_xattr_in = fdi.indata; list_xattr_in->size = linux_list_len + sizeof(*list_xattr_out); - attr_str = (char *)fdi.indata + sizeof(*list_xattr_in); - snprintf(attr_str, len, "%s%c", prefix, extattr_namespace_separator); err = fdisp_wait_answ(&fdi); if (err != 0) Modified: head/tests/sys/fs/fusefs/mockfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.cc Fri Aug 16 04:54:38 2019 (r351112) +++ head/tests/sys/fs/fusefs/mockfs.cc Fri Aug 16 05:06:54 2019 (r351113) @@ -554,16 +554,13 @@ void MockFS::audit_request(const mockfs_buf_in &in) { "Missing request attribute name"; break; case FUSE_GETXATTR: - ASSERT_GE(inlen, fih + sizeof(in.body.setxattr)) << + ASSERT_GE(inlen, fih + sizeof(in.body.getxattr)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.setxattr)) << + ASSERT_GT(inlen, fih + sizeof(in.body.getxattr)) << "Missing request attribute name"; break; case FUSE_LISTXATTR: - ASSERT_GE(inlen, fih + sizeof(in.body.listxattr)) << - "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.listxattr)) << - "Missing namespace"; + ASSERT_EQ(inlen, fih + sizeof(in.body.listxattr)); break; case FUSE_REMOVEXATTR: ASSERT_GT(inlen, fih) << "Missing request attribute name"; From owner-svn-src-head@freebsd.org Fri Aug 16 09:43:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B01A5C69ED; Fri, 16 Aug 2019 09:43:50 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468z0k4BmXz42R0; Fri, 16 Aug 2019 09:43:50 +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 7178F27073; Fri, 16 Aug 2019 09:43:50 +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 x7G9hoJk027755; Fri, 16 Aug 2019 09:43:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7G9hnH3027751; Fri, 16 Aug 2019 09:43:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908160943.x7G9hnH3027751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Aug 2019 09:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351114 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 351114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 09:43:50 -0000 Author: kib Date: Fri Aug 16 09:43:49 2019 New Revision: 351114 URL: https://svnweb.freebsd.org/changeset/base/351114 Log: Fix OOM handling of some corner cases. In addition to pagedaemon initiating OOM, also do it from the vm_fault() internals. Namely, if the thread waits for a free page to satisfy page fault some preconfigured amount of time, trigger OOM. These triggers are rate-limited, due to a usual case of several threads of the same multi-threaded process to enter fault handler simultaneously. The faults from pagedaemon threads participate in the calculation of OOM rate, but are not under the limit. Reviewed by: markj (previous version) Tested by: pho Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D13671 Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_page.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pageout.h Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Aug 16 05:06:54 2019 (r351113) +++ head/sys/vm/vm_fault.c Fri Aug 16 09:43:49 2019 (r351114) @@ -135,6 +135,18 @@ static void vm_fault_dontneed(const struct faultstate static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, int backward, int forward, bool obj_locked); +static int vm_pfault_oom_attempts = 3; +SYSCTL_INT(_vm, OID_AUTO, pfault_oom_attempts, CTLFLAG_RWTUN, + &vm_pfault_oom_attempts, 0, + "Number of page allocation attempts in page fault handler before it " + "triggers OOM handling"); + +static int vm_pfault_oom_wait = 10; +SYSCTL_INT(_vm, OID_AUTO, pfault_oom_wait, CTLFLAG_RWTUN, + &vm_pfault_oom_wait, 0, + "Number of seconds to wait for free pages before retrying " + "the page fault handler"); + static inline void release_page(struct faultstate *fs) { @@ -570,7 +582,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot vm_pindex_t retry_pindex; vm_prot_t prot, retry_prot; int ahead, alloc_req, behind, cluster_offset, error, era, faultcount; - int locked, nera, result, rv; + int locked, nera, oom, result, rv; u_char behavior; boolean_t wired; /* Passed by reference. */ bool dead, hardfault, is_first_object_locked; @@ -581,7 +593,9 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot nera = -1; hardfault = false; -RetryFault:; +RetryFault: + oom = 0; +RetryFault_oom: /* * Find the backing store object and offset into it to begin the @@ -827,7 +841,18 @@ RetryFault:; } if (fs.m == NULL) { unlock_and_deallocate(&fs); - vm_waitpfault(dset); + if (vm_pfault_oom_attempts < 0 || + oom < vm_pfault_oom_attempts) { + oom++; + vm_waitpfault(dset, + vm_pfault_oom_wait * hz); + goto RetryFault_oom; + } + if (bootverbose) + printf( + "proc %d (%s) failed to alloc page on fault, starting OOM\n", + curproc->p_pid, curproc->p_comm); + vm_pageout_oom(VM_OOM_MEM_PF); goto RetryFault; } } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Aug 16 05:06:54 2019 (r351113) +++ head/sys/vm/vm_page.c Fri Aug 16 09:43:49 2019 (r351114) @@ -3032,7 +3032,7 @@ vm_domain_alloc_fail(struct vm_domain *vmd, vm_object_ * this balance without careful testing first. */ void -vm_waitpfault(struct domainset *dset) +vm_waitpfault(struct domainset *dset, int timo) { /* @@ -3044,7 +3044,7 @@ vm_waitpfault(struct domainset *dset) if (vm_page_count_min_set(&dset->ds_mask)) { vm_min_waiters++; msleep(&vm_min_domains, &vm_domainset_lock, PUSER | PDROP, - "pfault", 0); + "pfault", timo); } else mtx_unlock(&vm_domainset_lock); } Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Aug 16 05:06:54 2019 (r351113) +++ head/sys/vm/vm_pageout.c Fri Aug 16 09:43:49 2019 (r351114) @@ -1720,6 +1720,12 @@ vm_pageout_oom_pagecount(struct vmspace *vmspace) return (res); } +static int vm_oom_ratelim_last; +static int vm_oom_pf_secs = 10; +SYSCTL_INT(_vm, OID_AUTO, oom_pf_secs, CTLFLAG_RWTUN, &vm_oom_pf_secs, 0, + ""); +static struct mtx vm_oom_ratelim_mtx; + void vm_pageout_oom(int shortage) { @@ -1727,9 +1733,31 @@ vm_pageout_oom(int shortage) vm_offset_t size, bigsize; struct thread *td; struct vmspace *vm; + int now; bool breakout; /* + * For OOM requests originating from vm_fault(), there is a high + * chance that a single large process faults simultaneously in + * several threads. Also, on an active system running many + * processes of middle-size, like buildworld, all of them + * could fault almost simultaneously as well. + * + * To avoid killing too many processes, rate-limit OOMs + * initiated by vm_fault() time-outs on the waits for free + * pages. + */ + mtx_lock(&vm_oom_ratelim_mtx); + now = ticks; + if (shortage == VM_OOM_MEM_PF && + (u_int)(now - vm_oom_ratelim_last) < hz * vm_oom_pf_secs) { + mtx_unlock(&vm_oom_ratelim_mtx); + return; + } + vm_oom_ratelim_last = now; + mtx_unlock(&vm_oom_ratelim_mtx); + + /* * We keep the process bigproc locked once we find it to keep anyone * from messing with it; however, there is a possibility of * deadlock if process B is bigproc and one of its child processes @@ -1793,7 +1821,7 @@ vm_pageout_oom(int shortage) continue; } size = vmspace_swap_count(vm); - if (shortage == VM_OOM_MEM) + if (shortage == VM_OOM_MEM || shortage == VM_OOM_MEM_PF) size += vm_pageout_oom_pagecount(vm); vm_map_unlock_read(&vm->vm_map); vmspace_free(vm); @@ -2048,6 +2076,7 @@ vm_pageout(void) p = curproc; td = curthread; + mtx_init(&vm_oom_ratelim_mtx, "vmoomr", NULL, MTX_DEF); swap_pager_swap_init(); for (first = -1, i = 0; i < vm_ndomains; i++) { if (VM_DOMAIN_EMPTY(i)) { Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Fri Aug 16 05:06:54 2019 (r351113) +++ head/sys/vm/vm_pageout.h Fri Aug 16 09:43:49 2019 (r351114) @@ -79,7 +79,8 @@ extern u_long vm_page_max_user_wired; extern int vm_pageout_page_count; #define VM_OOM_MEM 1 -#define VM_OOM_SWAPZ 2 +#define VM_OOM_MEM_PF 2 +#define VM_OOM_SWAPZ 3 /* * vm_lowmem flags. @@ -96,7 +97,7 @@ extern int vm_pageout_page_count; */ void vm_wait(vm_object_t obj); -void vm_waitpfault(struct domainset *); +void vm_waitpfault(struct domainset *, int timo); void vm_wait_domain(int domain); void vm_wait_min(void); void vm_wait_severe(void); From owner-svn-src-head@freebsd.org Fri Aug 16 10:43:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2EA78C835A; Fri, 16 Aug 2019 10:43:24 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4690KS0GSwz45ZR; Fri, 16 Aug 2019 10:43:24 +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 E0A6E27B8F; Fri, 16 Aug 2019 10:43:23 +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 x7GAhNst063285; Fri, 16 Aug 2019 10:43:23 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GAhNda063284; Fri, 16 Aug 2019 10:43:23 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201908161043.x7GAhNda063284@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: Fri, 16 Aug 2019 10:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351115 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Commit-Revision: 351115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 10:43:24 -0000 Author: 0mp (ports committer) Date: Fri Aug 16 10:43:23 2019 New Revision: 351115 URL: https://svnweb.freebsd.org/changeset/base/351115 Log: zpool-features.7: Fix a typo Reported by: pstef Reviewed by: pstef Approved by: src (pstef) Differential Revision: https://reviews.freebsd.org/D21290 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 Fri Aug 16 09:43:49 2019 (r351114) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Fri Aug 16 10:43:23 2019 (r351115) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 7, 2017 +.Dd August 16, 2019 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -284,7 +284,7 @@ configuration. .It DEPENDENCIES Ta none .El .Pp -This features allows ZFS to maintain more information about how free space +This feature allows ZFS to maintain more information about how free space is organized within the pool. If this feature is .Sy enabled , From owner-svn-src-head@freebsd.org Fri Aug 16 13:10:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8522DCBE7A; Fri, 16 Aug 2019 13:10:09 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4693Zn2sRrz4FJB; Fri, 16 Aug 2019 13:10:09 +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 4025C1624; Fri, 16 Aug 2019 13:10:09 +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 x7GDA8tJ046373; Fri, 16 Aug 2019 13:10:08 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GDA8Pf046372; Fri, 16 Aug 2019 13:10:08 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201908161310.x7GDA8Pf046372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 16 Aug 2019 13:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351118 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libpthread X-SVN-Commit-Revision: 351118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 13:10:09 -0000 Author: vangyzen Date: Fri Aug 16 13:10:08 2019 New Revision: 351118 URL: https://svnweb.freebsd.org/changeset/base/351118 Log: Update pthread_cond_timedwait() test to current NetBSD NetBSD adapted and committed our r350620. Update to their version 1.8. Reviewed by: ngie Obtained from: NetBSD MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21279 Modified: head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_condwait.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Fri Aug 16 12:28:37 2019 (r351117) +++ head/contrib/netbsd-tests/lib/libpthread/t_condwait.c Fri Aug 16 13:10:08 2019 (r351118) @@ -1,4 +1,4 @@ -/* $NetBSD: t_condwait.c,v 1.5 2017/01/16 16:29:19 christos Exp $ */ +/* $NetBSD: t_condwait.c,v 1.8 2019/08/11 11:42:23 martin Exp $ */ /* * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_condwait.c,v 1.5 2017/01/16 16:29:19 christos Exp $"); +__RCSID("$NetBSD: t_condwait.c,v 1.8 2019/08/11 11:42:23 martin Exp $"); #include #include @@ -50,10 +50,7 @@ static const int debug = 1; static void * run(void *param) { - struct timespec ts, to, te; -#ifdef __FreeBSD__ - struct timespec tw; -#endif + struct timespec ts, to, te, twmin, twmax; clockid_t clck; pthread_condattr_t attr; pthread_cond_t cond; @@ -88,22 +85,23 @@ run(void *param) printf("elapsed: %lld.%09ld sec\n", (long long)to.tv_sec, to.tv_nsec); } + twmin.tv_sec = WAITTIME; + twmin.tv_nsec = 0; if (isQEMU()) { - double to_seconds = to.tv_sec + 1e-9 * to.tv_nsec; - ATF_REQUIRE(to_seconds >= WAITTIME * 0.9); - /* Loose upper limit because of qemu timing bugs */ - ATF_REQUIRE(to_seconds < WAITTIME * 2.5); + struct timespec td, t; + // td.tv_sec = 0; + // td.tv_nsec = 900000000; + t = twmin; + // timespecsub(&t, &td, &twmin); + td.tv_sec = 2; + td.tv_nsec = 500000000; + timespecadd(&t, &td, &twmax); } else { -#ifdef __FreeBSD__ - tw.tv_sec = WAITTIME; - tw.tv_nsec = 0; - ATF_REQUIRE(timespeccmp(&to, &tw, >=)); - tw.tv_sec++; - ATF_REQUIRE(timespeccmp(&to, &tw, <=)); -#else - ATF_REQUIRE_EQ(to.tv_sec, WAITTIME); -#endif + twmax = twmin; + twmax.tv_sec++; } + ATF_REQUIRE(timespeccmp(&to, &twmin, >=)); + ATF_REQUIRE(timespeccmp(&to, &twmax, <=)); break; default: ATF_REQUIRE_MSG(0, "pthread_cond_timedwait: %s", strerror(ret)); @@ -152,5 +150,5 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, cond_wait_real); ATF_TP_ADD_TC(tp, cond_wait_mono); - return 0; + return atf_no_error(); } From owner-svn-src-head@freebsd.org Fri Aug 16 13:22:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E979FCC37D; Fri, 16 Aug 2019 13:22:57 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4693sY5kZ9z4G9t; Fri, 16 Aug 2019 13:22:57 +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 A656B199A; Fri, 16 Aug 2019 13:22:57 +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 x7GDMvP3058029; Fri, 16 Aug 2019 13:22:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GDMvhP058028; Fri, 16 Aug 2019 13:22:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908161322.x7GDMvhP058028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 16 Aug 2019 13:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351119 - in head/stand: . libsa X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand: . libsa X-SVN-Commit-Revision: 351119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 13:22:58 -0000 Author: kevans Date: Fri Aug 16 13:22:57 2019 New Revision: 351119 URL: https://svnweb.freebsd.org/changeset/base/351119 Log: stand: push LIBC_SRC up into defs.mk Other parts of stand/ that don't use libsa will need to grab bits from libc shortly. Push LIBC_SRC up to defs.mk in advance of this so that they can use it, and rename it to LIBCSRC to match the convention of the rest of the *SRC variables in this file. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21282 Modified: head/stand/defs.mk head/stand/libsa/Makefile Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Fri Aug 16 13:10:08 2019 (r351118) +++ head/stand/defs.mk Fri Aug 16 13:22:57 2019 (r351119) @@ -33,6 +33,7 @@ SASRC= ${BOOTSRC}/libsa SYSDIR= ${SRCTOP}/sys UBOOTSRC= ${BOOTSRC}/uboot ZFSSRC= ${SASRC}/zfs +LIBCSRC= ${SRCTOP}/lib/libc BOOTOBJ= ${OBJTOP}/stand Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Fri Aug 16 13:10:08 2019 (r351118) +++ head/stand/libsa/Makefile Fri Aug 16 13:22:57 2019 (r351119) @@ -9,7 +9,6 @@ .include LIBSA_CPUARCH?=${MACHINE_CPUARCH} -LIBC_SRC= ${SRCTOP}/lib/libc LIB?= sa @@ -21,12 +20,12 @@ SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -.PATH: ${LIBC_SRC}/net +.PATH: ${LIBCSRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${LIBC_SRC}/string +.PATH: ${LIBCSRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \ qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ @@ -34,7 +33,7 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ strnlen.c strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c # stdlib functions from libc -.PATH: ${LIBC_SRC}/stdlib +.PATH: ${LIBCSRC}/stdlib SRCS+= abs.c strtol.c strtoll.c strtoul.c strtoull.c # common boot code @@ -42,7 +41,7 @@ SRCS+= abs.c strtol.c strtoll.c strtoul.c strtoull.c SRCS+= subr_boot.c .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${LIBC_SRC}/arm/gen +.PATH: ${LIBCSRC}/arm/gen # Do not generate movt/movw, because the relocation fixup for them does not # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). @@ -68,22 +67,22 @@ SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S a .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" -.PATH: ${LIBC_SRC}/${MACHINE_CPUARCH}/gen +.PATH: ${LIBCSRC}/${MACHINE_CPUARCH}/gen .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBC_SRC}/quad +.PATH: ${LIBCSRC}/quad SRCS+= ashldi3.c ashrdi3.c lshrdi3.c SRCS+= syncicache.c .endif .if ${MACHINE_CPUARCH} == "mips" -.PATH: ${LIBC_SRC}/quad +.PATH: ${LIBCSRC}/quad SRCS+= ashldi3.c ashrdi3.c lshrdi3.c .endif # uuid functions from libc -.PATH: ${LIBC_SRC}/uuid +.PATH: ${LIBCSRC}/uuid SRCS+= uuid_create_nil.c uuid_equal.c uuid_from_string.c uuid_is_nil.c uuid_to_string.c # _setjmp/_longjmp From owner-svn-src-head@freebsd.org Fri Aug 16 13:50:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36B3FCCE23; Fri, 16 Aug 2019 13:50:45 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4694Td0ksDz4Hdh; Fri, 16 Aug 2019 13:50:45 +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 F024E1D78; Fri, 16 Aug 2019 13:50:44 +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 x7GDoiU7069973; Fri, 16 Aug 2019 13:50:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GDoi6t069972; Fri, 16 Aug 2019 13:50:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908161350.x7GDoi6t069972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Aug 2019 13:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351120 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 351120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 13:50:45 -0000 Author: emaste Date: Fri Aug 16 13:50:44 2019 New Revision: 351120 URL: https://svnweb.freebsd.org/changeset/base/351120 Log: Regen src.conf.5 after r351027 (enable BSD_CRTBEGIN on powerpc) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Aug 16 13:22:57 2019 (r351119) +++ head/share/man/man5/src.conf.5 Fri Aug 16 13:50:44 2019 (r351120) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd August 13, 2019 +.Dd August 16, 2019 .Dt SRC.CONF 5 .Os .Sh NAME @@ -260,7 +260,7 @@ and .Pa crtend.o . .Pp This is a default setting on -powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +sparc64/sparc64. .It Va WITH_BSD_CRTBEGIN Enable the BSD licensed .Pa crtbegin.o @@ -268,7 +268,7 @@ and .Pa crtend.o . .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and riscv/riscv64. +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and riscv/riscv64. .It Va WITH_BSD_GREP Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP From owner-svn-src-head@freebsd.org Fri Aug 16 14:06:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EDD81CD4E0; Fri, 16 Aug 2019 14:06:04 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4694qJ5npbz4Jgq; Fri, 16 Aug 2019 14:06:04 +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 A8AF02124; Fri, 16 Aug 2019 14:06:04 +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 x7GE64pH081799; Fri, 16 Aug 2019 14:06:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GE64oY081798; Fri, 16 Aug 2019 14:06:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908161406.x7GE64oY081798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Aug 2019 14:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351121 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 351121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 14:06:05 -0000 Author: emaste Date: Fri Aug 16 14:06:04 2019 New Revision: 351121 URL: https://svnweb.freebsd.org/changeset/base/351121 Log: arch.7: indicate expectation that arm (i.e., v5) will be removed before 13.0 MFC after: 1 week Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Fri Aug 16 13:50:44 2019 (r351120) +++ head/share/man/man7/arch.7 Fri Aug 16 14:06:04 2019 (r351121) @@ -93,7 +93,7 @@ architectures, the final release. .It aarch64 Ta 11.0 .It alpha Ta 3.2 Ta 6.4 .It amd64 Ta 5.1 -.It arm Ta 6.0 +.It arm Ta 6.0 Ta 12.x .It armeb Ta 8.0 Ta 11.x .It armv6 Ta 10.0 .It armv7 Ta 12.0 From owner-svn-src-head@freebsd.org Fri Aug 16 14:14:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63B07CD77C; Fri, 16 Aug 2019 14:14:58 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46951Z1kCtz4K5H; Fri, 16 Aug 2019 14:14:58 +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 1E08322F9; Fri, 16 Aug 2019 14:14:58 +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 x7GEEw7H087523; Fri, 16 Aug 2019 14:14:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GEEv8s087522; Fri, 16 Aug 2019 14:14:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908161414.x7GEEv8s087522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Aug 2019 14:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351122 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 351122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 14:14:58 -0000 Author: emaste Date: Fri Aug 16 14:14:57 2019 New Revision: 351122 URL: https://svnweb.freebsd.org/changeset/base/351122 Log: Add @generated tag to libc syscall asm wrappers Although libc syscall wrappers do not get checked in this can aid in finding the source of generated files when spelunking in the objdir. Multiple tools use @generated to identify generated files (for example, in a review Phabricator will by default hide diffs in generated files). For consistency use the @generated tag in makesyscalls.sh as we've done for other generated files, even though these wrappers aren't checked in to the tree. Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Fri Aug 16 14:06:04 2019 (r351121) +++ head/lib/libc/sys/Makefile.inc Fri Aug 16 14:14:57 2019 (r351122) @@ -134,12 +134,14 @@ NOTE_GNU_STACK='' .endif ${SASM}: - printf '#include "compat.h"\n' > ${.TARGET} + printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET} + printf '#include "compat.h"\n' >> ${.TARGET} printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >> ${.TARGET} printf ${NOTE_GNU_STACK} >>${.TARGET} ${SPSEUDO}: - printf '#include "compat.h"\n' > ${.TARGET} + printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET} + printf '#include "compat.h"\n' >> ${.TARGET} printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \ >> ${.TARGET} printf ${NOTE_GNU_STACK} >>${.TARGET} From owner-svn-src-head@freebsd.org Fri Aug 16 17:08:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CB7FA8CCE; Fri, 16 Aug 2019 17:08:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4698sM0nP8z4T5k; Fri, 16 Aug 2019 17:08:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBCAE44FE; Fri, 16 Aug 2019 17:08:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GH86Rq088886; Fri, 16 Aug 2019 17:08:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GH863h088885; Fri, 16 Aug 2019 17:08:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908161708.x7GH863h088885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 16 Aug 2019 17:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351129 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 351129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 17:08:07 -0000 Author: manu Date: Fri Aug 16 17:08:06 2019 New Revision: 351129 URL: https://svnweb.freebsd.org/changeset/base/351129 Log: fdt: simple-mfd: Set the syscon memory to SHAREABLE Since syscon is usually used with another compatible string (and so another driver), this driver might want to map the memory too. MFC after: 1 week Modified: head/sys/dev/fdt/simple_mfd.c Modified: head/sys/dev/fdt/simple_mfd.c ============================================================================== --- head/sys/dev/fdt/simple_mfd.c Fri Aug 16 17:03:37 2019 (r351128) +++ head/sys/dev/fdt/simple_mfd.c Fri Aug 16 17:08:06 2019 (r351129) @@ -187,7 +187,7 @@ simple_mfd_attach(device_t dev) if (ofw_bus_is_compatible(dev, "syscon")) { sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE); + RF_ACTIVE | RF_SHAREABLE); if (sc->mem_res == NULL) { device_printf(dev, "Cannot allocate memory resource\n"); From owner-svn-src-head@freebsd.org Fri Aug 16 17:10:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE479A8D9B; Fri, 16 Aug 2019 17:10:38 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4698wG46Ghz4TGh; Fri, 16 Aug 2019 17:10:38 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EBFB4633; Fri, 16 Aug 2019 17:10:38 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GHAcXK089714; Fri, 16 Aug 2019 17:10:38 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GHAc2Y089713; Fri, 16 Aug 2019 17:10:38 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908161710.x7GHAc2Y089713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 16 Aug 2019 17:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351130 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 351130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 17:10:38 -0000 Author: manu Date: Fri Aug 16 17:10:38 2019 New Revision: 351130 URL: https://svnweb.freebsd.org/changeset/base/351130 Log: arm64: mv: a37x0_gpio: Set the memory to SHAREABLE Since r349596 the syscon driver will map the memory. Since the gpio/pinctrl controller wants it too set it to SHAREABLE. This fix the gpio controller for attaching and so consumer can use it. Now the sdhci_xenon driver can detect presence of an sdcard and attach the mmc driver. MFC after: 1 week Modified: head/sys/arm/mv/a37x0_gpio.c Modified: head/sys/arm/mv/a37x0_gpio.c ============================================================================== --- head/sys/arm/mv/a37x0_gpio.c Fri Aug 16 17:08:06 2019 (r351129) +++ head/sys/arm/mv/a37x0_gpio.c Fri Aug 16 17:10:38 2019 (r351130) @@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" static struct resource_spec a37x0_gpio_res_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Pinctl / GPIO */ - { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* Interrupts control */ + { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE }, /* Pinctl / GPIO */ + { SYS_RES_MEMORY, 1, RF_ACTIVE | RF_SHAREABLE }, /* Interrupts control */ { -1, 0, 0 } }; From owner-svn-src-head@freebsd.org Fri Aug 16 18:21:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82B97AB10B; Fri, 16 Aug 2019 18:21:32 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469BV42shDz4b4l; Fri, 16 Aug 2019 18:21:32 +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 450D85279; Fri, 16 Aug 2019 18:21:32 +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 x7GILWkl035475; Fri, 16 Aug 2019 18:21:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GILVmd035473; Fri, 16 Aug 2019 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201908161821.x7GILVmd035473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Aug 2019 18:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351131 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 351131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 18:21:32 -0000 Author: emaste Date: Fri Aug 16 18:21:31 2019 New Revision: 351131 URL: https://svnweb.freebsd.org/changeset/base/351131 Log: aarch64: make pmap_change_attr public like on other platforms Submitted by: Greg V Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D20787 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pmap.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Aug 16 17:10:38 2019 (r351130) +++ head/sys/arm64/arm64/pmap.c Fri Aug 16 18:21:31 2019 (r351131) @@ -295,7 +295,6 @@ static void pmap_pvh_free(struct md_page *pvh, pmap_t static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); -static int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode); static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode); static pt_entry_t *pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va); static pt_entry_t *pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, @@ -5263,7 +5262,7 @@ pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) * latter case, the memory type may have been changed on some part of the * virtual address range or the direct map. */ -static int +int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { int error; Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Fri Aug 16 17:10:38 2019 (r351130) +++ head/sys/arm64/include/pmap.h Fri Aug 16 18:21:31 2019 (r351131) @@ -143,6 +143,7 @@ extern vm_offset_t virtual_end; ((((va) | (pa)) & L1_OFFSET) == 0 && (size) >= L1_SIZE) void pmap_bootstrap(vm_offset_t, vm_offset_t, vm_paddr_t, vm_size_t); +int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode); void pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode); void pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t); vm_paddr_t pmap_kextract(vm_offset_t va); From owner-svn-src-head@freebsd.org Fri Aug 16 18:57:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8F40ABAC4; Fri, 16 Aug 2019 18:57:32 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469CHc5n18z4cyH; Fri, 16 Aug 2019 18:57:32 +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 A82125A31; Fri, 16 Aug 2019 18:57:32 +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 x7GIvW0t058285; Fri, 16 Aug 2019 18:57:32 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GIvWOE058283; Fri, 16 Aug 2019 18:57:32 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201908161857.x7GIvWOE058283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 16 Aug 2019 18:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351132 - in head/sys: dev/md sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: dev/md sys X-SVN-Commit-Revision: 351132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 18:57:33 -0000 Author: brooks Date: Fri Aug 16 18:57:32 2019 New Revision: 351132 URL: https://svnweb.freebsd.org/changeset/base/351132 Log: md(4): remove the unused and unusable MDIOCLIST ioctl. It is unused, the ABI was broken in r322969, and it is broken by design (more than MDNPAD md devices can exist and there is no way to retreive them with this interface). mdconfig(8) was converted to use libgeom to obtain this information in r157160 and any other consumers of MDIOCLIST should likewise be converted. Reviewed by: emaste Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18936 Modified: head/sys/dev/md/md.c head/sys/sys/mdioctl.h Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Fri Aug 16 18:21:31 2019 (r351131) +++ head/sys/dev/md/md.c Fri Aug 16 18:57:32 2019 (r351132) @@ -151,7 +151,6 @@ CTASSERT((sizeof(struct md_ioctl32)) == 436); #define MDIOCATTACH_32 _IOC_NEWTYPE(MDIOCATTACH, struct md_ioctl32) #define MDIOCDETACH_32 _IOC_NEWTYPE(MDIOCDETACH, struct md_ioctl32) #define MDIOCQUERY_32 _IOC_NEWTYPE(MDIOCQUERY, struct md_ioctl32) -#define MDIOCLIST_32 _IOC_NEWTYPE(MDIOCLIST, struct md_ioctl32) #define MDIOCRESIZE_32 _IOC_NEWTYPE(MDIOCRESIZE, struct md_ioctl32) #endif /* COMPAT_FREEBSD32 */ @@ -1876,48 +1875,6 @@ kern_mdquery(struct md_req *mdr) return (error); } -static int -kern_mdlist_locked(struct md_req *mdr) -{ - struct md_s *sc; - int i; - - sx_assert(&md_sx, SA_XLOCKED); - - /* - * Write the number of md devices to mdr->md_units[0]. - * Write the unit number of the first (mdr->md_units_nitems - 2) - * units to mdr->md_units[1::(mdr->md_units - 2)] and terminate the - * list with -1. - * - * XXX: There is currently no mechanism to retrieve unit - * numbers for more than (MDNPAD - 2) units. - * - * XXX: Due to the use of LIST_INSERT_HEAD in mdnew(), the - * list of visible unit numbers not stable. - */ - i = 1; - LIST_FOREACH(sc, &md_softc_list, list) { - if (i < mdr->md_units_nitems - 1) - mdr->md_units[i] = sc->unit; - i++; - } - mdr->md_units[MIN(i, mdr->md_units_nitems - 1)] = -1; - mdr->md_units[0] = i - 1; - return (0); -} - -static int -kern_mdlist(struct md_req *mdr) -{ - int error; - - sx_xlock(&md_sx); - error = kern_mdlist_locked(mdr); - sx_xunlock(&md_sx); - return (error); -} - /* Copy members that are not userspace pointers. */ #define MD_IOCTL2REQ(mdio, mdr) do { \ (mdr)->md_unit = (mdio)->md_unit; \ @@ -1958,8 +1915,7 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, case MDIOCATTACH: case MDIOCDETACH: case MDIOCRESIZE: - case MDIOCQUERY: - case MDIOCLIST: { + case MDIOCQUERY: { struct md_ioctl *mdio = (struct md_ioctl *)addr; if (mdio->md_version != MDIOVERSION) return (EINVAL); @@ -1976,8 +1932,7 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, case MDIOCATTACH_32: case MDIOCDETACH_32: case MDIOCRESIZE_32: - case MDIOCQUERY_32: - case MDIOCLIST_32: { + case MDIOCQUERY_32: { struct md_ioctl32 *mdio = (struct md_ioctl32 *)addr; if (mdio->md_version != MDIOVERSION) return (EINVAL); @@ -2018,12 +1973,6 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, case MDIOCQUERY_32: #endif error = kern_mdquery(&mdr); - break; - case MDIOCLIST: -#ifdef COMPAT_FREEBSD32 - case MDIOCLIST_32: -#endif - error = kern_mdlist(&mdr); break; default: error = ENOIOCTL; Modified: head/sys/sys/mdioctl.h ============================================================================== --- head/sys/sys/mdioctl.h Fri Aug 16 18:21:31 2019 (r351131) +++ head/sys/sys/mdioctl.h Fri Aug 16 18:57:32 2019 (r351132) @@ -64,7 +64,7 @@ struct md_ioctl { int md_fwheads; /* firmware heads */ int md_fwsectors; /* firmware sectors */ char *md_label; /* label of the device */ - int md_pad[MDNPAD]; /* storage for MDIOCLIST */ + int md_pad[MDNPAD]; /* padding */ }; #define MD_NAME "md" @@ -81,7 +81,6 @@ struct md_ioctl { #define MDIOCATTACH _IOWR('m', 0, struct md_ioctl) /* attach disk */ #define MDIOCDETACH _IOWR('m', 1, struct md_ioctl) /* detach disk */ #define MDIOCQUERY _IOWR('m', 2, struct md_ioctl) /* query status */ -#define MDIOCLIST _IOWR('m', 3, struct md_ioctl) /* query status */ #define MDIOCRESIZE _IOWR('m', 4, struct md_ioctl) /* resize disk */ #define MD_CLUSTER 0x01 /* Don't cluster */ From owner-svn-src-head@freebsd.org Fri Aug 16 19:27:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFB4EAC81A; Fri, 16 Aug 2019 19:27:06 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Cxk4CGNz4fjc; Fri, 16 Aug 2019 19:27:06 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 734BB6052; Fri, 16 Aug 2019 19:27:06 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GJR6TD075641; Fri, 16 Aug 2019 19:27:06 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GJR6TC075640; Fri, 16 Aug 2019 19:27:06 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201908161927.x7GJR6TC075640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 16 Aug 2019 19:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351133 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: ray X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 351133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 19:27:06 -0000 Author: ray Date: Fri Aug 16 19:27:05 2019 New Revision: 351133 URL: https://svnweb.freebsd.org/changeset/base/351133 Log: Check paddr for overflow. Fix panic on initialize of "vm reserv" per-superpage lock in case when RAM ends at upper boundary of address space. Observed on ARM32 board BPI-R2 (2GB RAM 0x80000000-0xffffffff). PR: 235362 Reviewed by: kib, markj, alc MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21272 Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Fri Aug 16 18:57:32 2019 (r351132) +++ head/sys/vm/vm_reserv.c Fri Aug 16 19:27:05 2019 (r351133) @@ -316,7 +316,8 @@ sysctl_vm_reserv_fullpop(SYSCTL_HANDLER_ARGS) for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; paddr = roundup2(seg->start, VM_LEVEL_0_SIZE); - while (paddr + VM_LEVEL_0_SIZE <= seg->end) { + while (paddr + VM_LEVEL_0_SIZE > paddr && paddr + + VM_LEVEL_0_SIZE <= seg->end) { rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT]; fullpop += rv->popcnt == VM_LEVEL_0_NPAGES; paddr += VM_LEVEL_0_SIZE; @@ -1055,7 +1056,8 @@ vm_reserv_init(void) for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; paddr = roundup2(seg->start, VM_LEVEL_0_SIZE); - while (paddr + VM_LEVEL_0_SIZE <= seg->end) { + while (paddr + VM_LEVEL_0_SIZE > paddr && paddr + + VM_LEVEL_0_SIZE <= seg->end) { rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT]; rv->pages = PHYS_TO_VM_PAGE(paddr); rv->domain = seg->domain; From owner-svn-src-head@freebsd.org Fri Aug 16 19:46:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C224BAD0B2; Fri, 16 Aug 2019 19:46:22 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469DMy4p0sz4gxG; Fri, 16 Aug 2019 19:46:22 +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 863E96430; Fri, 16 Aug 2019 19:46:22 +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 x7GJkMWh088155; Fri, 16 Aug 2019 19:46:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GJkMQ0088154; Fri, 16 Aug 2019 19:46:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908161946.x7GJkMQ0088154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Aug 2019 19:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351134 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 351134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 19:46:22 -0000 Author: mav Date: Fri Aug 16 19:46:22 2019 New Revision: 351134 URL: https://svnweb.freebsd.org/changeset/base/351134 Log: Add support for 'j', 't' and 'z' flags to kernel sscanf(). MFC after: 2 weeks Modified: head/sys/kern/subr_scanf.c Modified: head/sys/kern/subr_scanf.c ============================================================================== --- head/sys/kern/subr_scanf.c Fri Aug 16 19:27:05 2019 (r351133) +++ head/sys/kern/subr_scanf.c Fri Aug 16 19:46:22 2019 (r351134) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * Note that stdarg.h and the ANSI style va_start macro is used for both @@ -61,6 +62,9 @@ __FBSDID("$FreeBSD$"); #define POINTER 0x10 /* weird %p pointer (`fake hex') */ #define NOSKIP 0x20 /* do not skip blanks */ #define QUAD 0x400 +#define INTMAXT 0x800 /* j: intmax_t */ +#define PTRDIFFT 0x1000 /* t: ptrdiff_t */ +#define SIZET 0x2000 /* z: size_t */ #define SHORTSHORT 0x4000 /** hh: char */ /* @@ -162,6 +166,9 @@ literal: case '*': flags |= SUPPRESS; goto again; + case 'j': + flags |= INTMAXT; + goto again; case 'l': if (flags & LONG){ flags &= ~LONG; @@ -173,6 +180,12 @@ literal: case 'q': flags |= QUAD; goto again; + case 't': + flags |= PTRDIFFT; + goto again; + case 'z': + flags |= SIZET; + goto again; case 'h': if (flags & SHORT){ flags &= ~SHORT; @@ -256,6 +269,12 @@ literal: *va_arg(ap, long *) = nread; else if (flags & QUAD) *va_arg(ap, quad_t *) = nread; + else if (flags & INTMAXT) + *va_arg(ap, intmax_t *) = nread; + else if (flags & SIZET) + *va_arg(ap, size_t *) = nread; + else if (flags & PTRDIFFT) + *va_arg(ap, ptrdiff_t *) = nread; else *va_arg(ap, int *) = nread; continue; @@ -533,6 +552,12 @@ literal: *va_arg(ap, long *) = res; else if (flags & QUAD) *va_arg(ap, quad_t *) = res; + else if (flags & INTMAXT) + *va_arg(ap, intmax_t *) = res; + else if (flags & PTRDIFFT) + *va_arg(ap, ptrdiff_t *) = res; + else if (flags & SIZET) + *va_arg(ap, size_t *) = res; else *va_arg(ap, int *) = res; nassigned++; From owner-svn-src-head@freebsd.org Fri Aug 16 20:07:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44CD4AD68B; Fri, 16 Aug 2019 20:07:44 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Drc19h2z4hmX; Fri, 16 Aug 2019 20:07:44 +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 09AD167F9; Fri, 16 Aug 2019 20:07:44 +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 x7GK7hVR000548; Fri, 16 Aug 2019 20:07:43 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GK7hcY000547; Fri, 16 Aug 2019 20:07:43 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908162007.x7GK7hcY000547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 16 Aug 2019 20:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351135 - head/stand/i386/boot2 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/i386/boot2 X-SVN-Commit-Revision: 351135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 20:07:44 -0000 Author: kevans Date: Fri Aug 16 20:07:43 2019 New Revision: 351135 URL: https://svnweb.freebsd.org/changeset/base/351135 Log: stand: boot2: fix build with xtoolchain-llvm90 ufsread.c grows a dependency on __ashldi3 with llvm90. Grab ashldi3.c out of compiler-rt rather than trying to link against libsa (for now). -Wno-missing-prototypes is necessary to compile ashldi3.c standalone. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21291 Modified: head/stand/i386/boot2/Makefile Modified: head/stand/i386/boot2/Makefile ============================================================================== --- head/stand/i386/boot2/Makefile Fri Aug 16 19:46:22 2019 (r351134) +++ head/stand/i386/boot2/Makefile Fri Aug 16 20:07:43 2019 (r351135) @@ -78,7 +78,12 @@ boot2.ldr: boot2.bin: boot2.out ${OBJCOPY} -S -O binary boot2.out ${.TARGET} -boot2.out: ${BTXCRT} boot2.o sio.o +# For __ashldi3 +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins +CFLAGS.ashldi3.c= -Wno-missing-prototypes +CLEANFILES+= ashldi3.o + +boot2.out: ${BTXCRT} boot2.o sio.o ashldi3.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} SRCS= boot2.c boot2.h From owner-svn-src-head@freebsd.org Fri Aug 16 20:09:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 387BEAD82D; Fri, 16 Aug 2019 20:09:21 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469DtT0bs9z4hxv; Fri, 16 Aug 2019 20:09:21 +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 EA5F667FC; Fri, 16 Aug 2019 20:09:20 +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 x7GK9KR5000661; Fri, 16 Aug 2019 20:09:20 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GK9KnT000660; Fri, 16 Aug 2019 20:09:20 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908162009.x7GK9KnT000660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 16 Aug 2019 20:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351136 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 351136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 20:09:21 -0000 Author: kevans Date: Fri Aug 16 20:09:20 2019 New Revision: 351136 URL: https://svnweb.freebsd.org/changeset/base/351136 Log: stand: gptboot: fix build with xtoolchain-llvm90 ufsread.c grows a dependency on __ashldi3 with llvm90. For gptboot, just start pulling in ashldi3.c ashrdi3.c lshrdi3.c into libsa for all archs as the number of archs requiring one or more of them keeps growing. qdivrem.c and quad.h can be trivially kicked out of libsa if we start pulling these from compiler-rt as qdivrem was only used to implement umoddi3, divdi3, moddi3 (also in qdivrem.c). Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21291 Deleted: head/stand/libsa/qdivrem.c head/stand/libsa/quad.h Modified: head/stand/libsa/Makefile Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Fri Aug 16 20:07:43 2019 (r351135) +++ head/stand/libsa/Makefile Fri Aug 16 20:09:20 2019 (r351136) @@ -28,7 +28,7 @@ SRCS+= ntoh.c .PATH: ${LIBCSRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \ - qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ + strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \ strnlen.c strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c @@ -53,14 +53,6 @@ CFLAGS.clang+= -mno-movt .endif CFLAGS.clang+= -mfpu=none -# Compiler support functions -.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/ -# __clzsi2 and ctzsi2 for various builtin functions -SRCS+= clzsi2.c ctzsi2.c -# Divide and modulus functions called by the compiler -SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c -SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c - .PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S @@ -70,15 +62,17 @@ SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S a .PATH: ${LIBCSRC}/${MACHINE_CPUARCH}/gen .endif -.if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBCSRC}/quad +# Compiler support functions +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/ +# __clzsi2 and ctzsi2 for various builtin functions +SRCS+= clzsi2.c ctzsi2.c +# Divide and modulus functions called by the compiler +SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c +SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c SRCS+= ashldi3.c ashrdi3.c lshrdi3.c -SRCS+= syncicache.c -.endif -.if ${MACHINE_CPUARCH} == "mips" -.PATH: ${LIBCSRC}/quad -SRCS+= ashldi3.c ashrdi3.c lshrdi3.c +.if ${MACHINE_CPUARCH} == "powerpc" +SRCS+= syncicache.c .endif # uuid functions from libc From owner-svn-src-head@freebsd.org Fri Aug 16 20:14:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09A26ADAAC; Fri, 16 Aug 2019 20:14:38 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469F0Z01pjz4jMD; Fri, 16 Aug 2019 20:14:38 +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 D64CF69B6; Fri, 16 Aug 2019 20:14:37 +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 x7GKEbE1006149; Fri, 16 Aug 2019 20:14:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GKEb8L006145; Fri, 16 Aug 2019 20:14:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908162014.x7GKEb8L006145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Aug 2019 20:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351137 - in head/sys: conf dev/ntb/test modules/ntb X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys: conf dev/ntb/test modules/ntb X-SVN-Commit-Revision: 351137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 20:14:38 -0000 Author: mav Date: Fri Aug 16 20:14:37 2019 New Revision: 351137 URL: https://svnweb.freebsd.org/changeset/base/351137 Log: NTB Tool: Test driver for NTB hardware drivers. NTB Tool driver is meant for testing NTB hardware driver functionalities, such as doorbell interrupts, link events, scratchpad registers and memory windows. This is a port of ntb_tool driver from Linux. It has been verified on top of AMD and PLX NTB HW drivers. Submitted by: Arpan Palit Cleaned up by: mav MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D18819 Added: head/sys/dev/ntb/test/ head/sys/dev/ntb/test/ntb_tool.c (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/ntb/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Aug 16 20:09:20 2019 (r351136) +++ head/sys/conf/files.amd64 Fri Aug 16 20:14:37 2019 (r351137) @@ -225,6 +225,7 @@ dev/ntb/ntb_if.m optional ntb | ntb_transport | if_nt dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw +dev/ntb/test/ntb_tool.c optional ntb_tool dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional rdrand_rng !random_loadable dev/random/nehemiah.c optional padlock_rng !random_loadable Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Aug 16 20:09:20 2019 (r351136) +++ head/sys/conf/files.i386 Fri Aug 16 20:14:37 2019 (r351137) @@ -156,6 +156,7 @@ dev/ntb/ntb_if.m optional ntb | ntb_transport | if_nt dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw +dev/ntb/test/ntb_tool.c optional ntb_tool dev/nvram/nvram.c optional nvram isa dev/ofw/ofwpci.c optional fdt pci dev/pcf/pcf_isa.c optional pcf Added: head/sys/dev/ntb/test/ntb_tool.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ntb/test/ntb_tool.c Fri Aug 16 20:14:37 2019 (r351137) @@ -0,0 +1,1516 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright (c) 2019 Advanced Micro Devices, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * BSD LICENSE + * + * Copyright (c) 2019 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copy + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Advanced Micro Devices, Inc nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER 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. + * + * PCIe NTB Debugging Tool FreeBSD driver + */ + +/* + * How to use this tool, by example. + * + * List of sysctl for ntb_tool driver. + * root@local# sysctl -a | grep ntb_tool + * dev.ntb_tool.0.peer0.spad7: 0x0 + * dev.ntb_tool.0.peer0.spad6: 0x0 + * dev.ntb_tool.0.peer0.spad5: 0x0 + * dev.ntb_tool.0.peer0.spad4: 0x0 + * dev.ntb_tool.0.peer0.spad3: 0x0 + * dev.ntb_tool.0.peer0.spad2: 0x0 + * dev.ntb_tool.0.peer0.spad1: 0x0 + * dev.ntb_tool.0.peer0.spad0: 0x0 + * dev.ntb_tool.0.peer0.mw_trans2: + * dev.ntb_tool.0.peer0.mw_trans1: + * dev.ntb_tool.0.peer0.mw_trans0: + * dev.ntb_tool.0.peer0.peer_mw2: + * dev.ntb_tool.0.peer0.peer_mw1: + * dev.ntb_tool.0.peer0.peer_mw0: + * dev.ntb_tool.0.peer0.mw2: + * dev.ntb_tool.0.peer0.mw1: + * dev.ntb_tool.0.peer0.mw0: + * dev.ntb_tool.0.peer0.link_event: 0x0 + * dev.ntb_tool.0.peer0.link: Y + * dev.ntb_tool.0.peer0.port: 1 + * dev.ntb_tool.0.spad7: 0x0 + * dev.ntb_tool.0.spad6: 0x0 + * dev.ntb_tool.0.spad5: 0x0 + * dev.ntb_tool.0.spad4: 0x0 + * dev.ntb_tool.0.spad3: 0x0 + * dev.ntb_tool.0.spad2: 0x0 + * dev.ntb_tool.0.spad1: 0x0 + * dev.ntb_tool.0.spad0: 0x0 + * dev.ntb_tool.0.db: 0x0 + * dev.ntb_tool.0.db_event: 0x0 + * dev.ntb_tool.0.db_mask: 0xffff + * dev.ntb_tool.0.db_valid_mask: 0xffff + * dev.ntb_tool.0.peer_db: 0x0 + * dev.ntb_tool.0.peer_db_mask: 0xffff + * dev.ntb_tool.0.link: Y + * dev.ntb_tool.0.port: 0 + * + * The above example list shows + * 1) three memory windows, + * 1) eight scratchpad registers. + * 3) doorbell config. + * 4) link config. + * 2) One peer. + * + * Based on the underlined ntb_hw driver config & connection topology, these + * things might differ. + *----------------------------------------------------------------------------- + * Eg: check local/peer port information. + * + * # Get local device port number + * root@local# sysctl dev.ntb_tool.0.port + * + * # Check peer device port number + * root@local# sysctl dev.ntb_tool.0.peer0.port + *----------------------------------------------------------------------------- + * Eg: NTB link tests + * + * # Set local link up/down + * root@local# sysctl dev.ntb_tool.0.link=Y + * root@local# sysctl dev.ntb_tool.0.link=N + * + * # Check if link with peer device is up/down: + * root@local# sysctl dev.ntb_tool.0.peer0.link + * + * # Poll until the link specified as up/down. For up, value needs to be set + * depends on peer index, i.e., for peer0 it is 0x1 and for down, value needs + * to be set as 0x0. + * root@local# sysctl dev.ntb_tool.0.peer0.link_event=0x1 + * root@local# sysctl dev.ntb_tool.0.peer0.link_event=0x0 + *----------------------------------------------------------------------------- + * Eg: Doorbell registers tests + * + * # clear/get local doorbell + * root@local# sysctl dev.ntb_tool.0.db="c 0x1" + * root@local# sysctl dev.ntb_tool.0.db + * + * # Set/clear/get local doorbell mask + * root@local# sysctl dev.ntb_tool.0.db_mask="s 0x1" + * root@local# sysctl dev.ntb_tool.0.db_mask="c 0x1" + * root@local# sysctl dev.ntb_tool.0.db_mask + * + * # Ring/clear/get peer doorbell + * root@local# sysctl dev.ntb_tool.0.peer_db="s 0x1" + * root@local# sysctl dev.ntb_tool.0.peer_db="c 0x1" + * root@local# sysctl dev.ntb_tool.0.peer_db + * + * # Set/clear/get peer doorbell mask (functionality is absent) + * root@local# sysctl dev.ntb_tool.0.peer_db_mask="s 0x1" + * root@local# sysctl dev.ntb_tool.0.peer_db_mask="c 0x1" + * root@local# sysctl dev.ntb_tool.0.peer_db_mask + * + * # Poll until local doorbell is set with the specified db bits + * root@local# dev.ntb_tool.0.db_event=0x1 + *----------------------------------------------------------------------------- + * Eg: Scratchpad registers tests + * + * # Write/read to/from local scratchpad register #0 + * root@local# sysctl dev.ntb_tool.0.spad0=0x1023457 + * root@local# sysctl dev.ntb_tool.0.spad0 + * + * # Write/read to/from peer scratchpad register #0 + * root@local# sysctl dev.ntb_tool.0.peer0.spad0=0x01020304 + * root@local# sysctl dev.ntb_tool.0.peer0.spad0 + *----------------------------------------------------------------------------- + * Eg: Memory windows tests (need to configure local mw_trans on both sides) + * + * # Create inbound memory window buffer of specified size/get its dma address + * root@local# sysctl dev.ntb_tool.0.peer0.mw_trans0=16384 + * root@local# sysctl dev.ntb_tool.0.peer0.mw_trans0 + * + * # Write/read data to/from inbound memory window with specific pattern/random + * data. + * root@local# sysctl dev.ntb_tool.0.peer0.mw0="W offset 0 nbytes 100 pattern ab" + * root@local# sysctl dev.ntb_tool.0.peer0.mw0="R offset 0 nbytes 100" + * + * # Write/read data to/from outbound memory window on the local device with + * specific pattern/random (on peer device) + * root@local# sysctl dev.ntb_tool.0.peer0.peer_mw0="W offset 0 nbytes 100 pattern ab" + * root@local# sysctl dev.ntb_tool.0.peer0.peer_mw0="R offset 0 nbytes 100" + *----------------------------------------------------------------------------- + * NOTE: *Message registers are not supported* + *----------------------------------------------------------------------------- + * + * contact information: + * Arpan Palit + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "../ntb.h" + +/* Buffer length for User input */ +#define TOOL_BUF_LEN 48 +/* Memory window default command read and write offset. */ +#define DEFAULT_MW_OFF 0 +/* Memory window default size and also max command read size. */ +#define DEFAULT_MW_SIZE 1024 + +MALLOC_DEFINE(M_NTB_TOOL, "ntb_tool", "ntb_tool driver memory allocation"); + +/* + * Memory windows descriptor structure + */ +struct tool_mw { + struct tool_ctx *tc; + int widx; + int pidx; + + /* Rx buff is off virt_addr / dma_base */ + bus_addr_t dma_base; + caddr_t virt_addr; + bus_dmamap_t dma_map; + bus_dma_tag_t dma_tag; + + /* Tx buff is off vbase / phys_addr */ + caddr_t mm_base; + vm_paddr_t phys_addr; + bus_addr_t addr_limit; + size_t phys_size; + size_t xlat_align; + size_t xlat_align_size; + + /* Memory window configured size and limits */ + size_t size; + ssize_t mw_buf_size; + ssize_t mw_buf_offset; + ssize_t mw_peer_buf_size; + ssize_t mw_peer_buf_offset; + + /* options to handle sysctl out */ + int mw_cmd_rw; + int mw_peer_cmd_rw; +}; + +struct tool_spad { + int sidx; + int pidx; + struct tool_ctx *tc; +}; + +struct tool_peer { + int pidx; + struct tool_ctx *tc; + int inmw_cnt; + struct tool_mw *inmws; + int outspad_cnt; + struct tool_spad *outspads; + unsigned int port_no; +}; + +struct tool_ctx { + device_t dev; + struct callout link_event_timer; + struct callout db_event_timer; + int peer_cnt; + struct tool_peer *peers; + int inmsg_cnt; + struct tool_msg *inmsgs; + int inspad_cnt; + struct tool_spad *inspads; + unsigned int unsafe; + + /* sysctl read out variables */ + char link_status; + uint64_t link_bits; + uint64_t link_mask; + uint64_t db_valid_mask; + uint64_t db_mask_val; + uint64_t db_event_val; + uint64_t peer_db_val; + uint64_t peer_db_mask_val; + unsigned int port_no; +}; + +/* structure to save dma_addr after dma load */ +struct ntb_tool_load_cb_args { + bus_addr_t addr; + int error; +}; + +/* + * NTB events handlers + */ +static void +tool_link_event(void *ctx) +{ + struct tool_ctx *tc = ctx; + enum ntb_speed speed = 0; + enum ntb_width width = 0; + int up = 0; + + up = ntb_link_is_up(tc->dev, &speed, &width); + if (up) + tc->link_status = 'Y'; + else + tc->link_status = 'N'; + + device_printf(tc->dev, "link is %s speed %d width %d\n", + up ? "up" : "down", speed, width); +} + +static void +tool_db_event(void *ctx, uint32_t vec) +{ + struct tool_ctx *tc = ctx; + uint64_t db_bits, db_mask; + + db_mask = ntb_db_vector_mask(tc->dev, vec); + db_bits = ntb_db_read(tc->dev); + + device_printf(tc->dev, "doorbell vec %d mask %#llx bits %#llx\n", + vec, (unsigned long long)db_mask, (unsigned long long)db_bits); +} + +static const struct ntb_ctx_ops tool_ops = { + .link_event = tool_link_event, + .db_event = tool_db_event, +}; + +/* + * Callout event methods + */ +static void +tool_link_event_handler(void *arg) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg; + uint64_t val; + + val = ntb_link_is_up(tc->dev, NULL, NULL) & tc->link_mask; + + if (val == tc->link_bits) { + device_printf(tc->dev, "link_event successful for link val=" + "0x%jx\n", tc->link_bits); + tc->link_bits = 0x0; + tc->link_mask = 0x0; + } else + callout_reset(&tc->link_event_timer, 1, tool_link_event_handler, tc); +} + +static void +tool_db_event_handler(void *arg) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg; + uint64_t db_bits; + + db_bits = ntb_db_read(tc->dev); + + if (db_bits == tc->db_event_val) { + device_printf(tc->dev, "db_event successful for db val=0x%jx\n", + tc->db_event_val); + tc->db_event_val = 0x0; + } else + callout_reset(&tc->db_event_timer, 1, tool_db_event_handler, tc); +} + +/* + * Common read/write methods + */ +static inline int +get_ubuf(struct sysctl_req *req, char *ubuf) +{ + int rc; + + if (req->newlen >= TOOL_BUF_LEN) + return (EINVAL); + + rc = SYSCTL_IN(req, ubuf, req->newlen); + if (rc) + return (rc); + ubuf[req->newlen] = '\0'; + + return (0); +} + +static int +read_out(struct sysctl_req *req, uint64_t val) +{ + char ubuf[16]; + + memset((void *)ubuf, 0, sizeof(ubuf)); + snprintf(ubuf, sizeof(ubuf), "0x%jx", val); + + return SYSCTL_OUT(req, ubuf, sizeof(ubuf)); +} + +static int +tool_fn_read(struct tool_ctx *tc, struct sysctl_req *req, + uint64_t (*fn_read)(device_t ), uint64_t val) +{ + if (fn_read == NULL) + return read_out(req, val); + else if (fn_read) + return read_out(req, (uint64_t)fn_read(tc->dev)); + else + return (EINVAL); +} + +static int +tool_fn_write(struct tool_ctx *tc, struct sysctl_oid *oidp, + struct sysctl_req *req, char *ubuf, uint64_t *val, bool db_mask_sflag, + void (*fn_set)(device_t , uint64_t), void (*fn_clear)(device_t , uint64_t)) +{ + uint64_t db_valid_mask = tc->db_valid_mask; + uint64_t bits; + char cmd; + + if (fn_set == NULL && fn_clear == NULL) { + device_printf(tc->dev, "ERR: Set & Clear both are not supported\n"); + return (EINVAL); + } + + if (tc->db_valid_mask == 0) + db_valid_mask = tc->db_valid_mask = ntb_db_valid_mask(tc->dev); + + bits = 0; + sscanf(ubuf, "%c %jx", &cmd, &bits); + if (cmd == 's') { + if ((bits | db_valid_mask) > db_valid_mask) { + device_printf(tc->dev, "0x%jx value is not supported\n", bits); + return (EINVAL); + } + if (fn_set) + fn_set(tc->dev, bits); + else + return (EINVAL); + if (val) + *val |= bits; + } else if (cmd == 'c') { + if ((bits | db_valid_mask) > db_valid_mask) { + device_printf(tc->dev, "0x%jx value is not supported\n", bits); + return (EINVAL); + } + if (fn_clear) + fn_clear(tc->dev, bits); + if (val) + *val &= ~bits; + } else { + device_printf(tc->dev, "Wrong Write\n"); + return (EINVAL); + } + + return (0); +} + +static int +parse_mw_buf(char *buf, char *cmd, ssize_t *offset, ssize_t *buf_size, + uint64_t *pattern, bool *s_pflag) +{ + char op1[8], op2[8], op3[8]; + uint64_t val1, val2, val3; + bool vs1, vs2, vs3; + int rc = 0; + + vs1 = vs2 = vs3 = false; + sscanf(buf, "%c %s %jx %s %jx %s %jx", + cmd, op1, &val1, op2, &val2, op3, &val3); + + if (*cmd != 'W' && *cmd != 'R') + return (EINVAL); + + if (!strcmp(op1, "offset")) { + *offset = val1 ? val1 : DEFAULT_MW_OFF; + vs1 = true; + } else if (!strcmp(op1, "nbytes")) { + *buf_size = val1 ? val1: DEFAULT_MW_SIZE; + vs2 = true; + } else if (!strcmp(op1, "pattern")) { + *pattern = val1; + vs3 = true; + } + + if (!vs1 && !strcmp(op2, "offset")) { + *offset = val2 ? val2 : DEFAULT_MW_OFF; + vs1 = true; + } else if (!vs2 && !strcmp(op2, "nbytes")) { + *buf_size = val2 ? val2: DEFAULT_MW_SIZE; + vs2 = true; + } else if (!vs3 && !strcmp(op2, "pattern")) { + *pattern = val2; + vs3 = true; + } + + if (!vs1 && !strcmp(op3, "offset")) { + *offset = val3 ? val3 : DEFAULT_MW_OFF; + } else if (!vs2 && !strcmp(op3, "nbytes")) { + *buf_size = val3 ? val3: DEFAULT_MW_SIZE; + } else if (!vs3 && !strcmp(op3, "pattern")) { + *pattern = val3; + vs3 = true; + } + + *s_pflag = vs3; + if (vs3 && *cmd == 'R') + printf("NTB_TOOL_WARN: pattern is not supported with read " + "command\n"); + + return (rc); +} + +static int +tool_mw_read_fn(struct sysctl_req *req, struct tool_mw *inmw, char *read_addr, + int *cmd_op, ssize_t buf_off, ssize_t buf_size, char *type) +{ + ssize_t index, size; + struct sbuf *sb; + int i, loop, rc; + char *tmp; + + /* The below check is made to ignore sysctl read call. */ + if (*cmd_op == 0) + return (0); + + /* Proceeds only when command R/W is requested using sysctl. */ + index = buf_off; + tmp = read_addr; + tmp += index; + loop = ((buf_size == 0) || (buf_size > DEFAULT_MW_SIZE)) ? + DEFAULT_MW_SIZE : buf_size; + /* + * 256 bytes of extra buffer has been allocated to print details like + * summary, size, notes, i.e., excluding data part. + */ + size = loop + 256; + sb = sbuf_new_for_sysctl(NULL, NULL, size, req); + if (sb == NULL) { + rc = sb->s_error; + return (rc); + } + + if (!strcmp(type, "mw")) + sbuf_printf(sb, "\nConfigured MW size\t: %zu\n", inmw->size); + else if (!strcmp(type, "peer_mw")) + sbuf_printf(sb, "\nConfigured Peer MW size\t: %zu\n", + inmw->size); + sbuf_printf(sb, "R/W size\t\t: %zi\nR/W Offset\t\t: %zi\n\nData\n----" + "->", buf_size, buf_off); + + /* + * Data will be read based on MW size provided by the user using nbytes, + * which is limited to 1024 bytes if user req bigger size to read, check + * above loop calculation which is limiting or setting the MW read size. + * Below for loop prints data where in each line contains 32 bytes data + * and after each 8 bytes of data we used four spaces which ensures one + * data block. + */ + for (i = 0 ; i < loop; i++) { + if ((i % 32) == 0) { + sbuf_printf(sb, "\n%08zx:", index); + index += 32; + } + if ((i % 8) == 0) + sbuf_printf(sb, " "); + sbuf_printf(sb, "%02hhx", *(tmp+i)); + } + if (buf_size > DEFAULT_MW_SIZE) + sbuf_printf(sb, "\n\nNOTE: Truncating read size %zi->1024 " + "bytes\n", buf_size); + + /* cmd_op is set to zero after completion of each R/W command. */ + *cmd_op -= 1; + rc = sbuf_finish(sb); + sbuf_delete(sb); + + return (rc); +} + +static int +tool_mw_write_fn(struct sysctl_oid *oidp, struct sysctl_req *req, + struct tool_mw *inmw, char *ubuf, caddr_t write_buf, int *cmd_op, + ssize_t *buf_offset, ssize_t *buf_size) +{ + ssize_t data_buf_size; + uint64_t pattern = 0; + bool s_pflag = false; + void *data_buf; + char cmd; + int rc; + + if (!write_buf) + return (ENXIO); + + /* buf_offset and buf_size set to default in case user does not req */ + *buf_offset = DEFAULT_MW_OFF; + *buf_size = DEFAULT_MW_SIZE; + rc = parse_mw_buf(ubuf, &cmd, buf_offset, buf_size, &pattern, &s_pflag); + if (rc) { + device_printf(inmw->tc->dev, "Wrong Command \"%c\" provided\n", + cmd); + return (rc); + } + + /* Check for req size and buffer limit */ + if ((*buf_offset + *buf_size) > inmw->size) { + device_printf(inmw->tc->dev, "%s: configured mw size :%zi and " + "requested size :%zi.\n", __func__, inmw->size, + (*buf_offset + *buf_size)); + *buf_offset = DEFAULT_MW_OFF; + *buf_size = DEFAULT_MW_SIZE; + rc = EINVAL; + goto out; + } + + if (cmd == 'R') + goto read_out; + else if (cmd == 'W') + goto write; + else + goto out; + +write: + data_buf_size = *buf_size; + data_buf = malloc(data_buf_size, M_NTB_TOOL, M_WAITOK | M_ZERO); + if (!data_buf) { + rc = ENOMEM; + goto out; + } + + if (s_pflag) + memset(data_buf, pattern, data_buf_size); + else + arc4rand(data_buf, data_buf_size, 1); + + memcpy(write_buf + *buf_offset, data_buf, data_buf_size); + + free(data_buf, M_NTB_TOOL); + +read_out: + /* cmd_op value is set to two as sysctl read call executes twice */ + *cmd_op = 2; +out: + return (rc); +} + +/* + * Port sysctl read/write methods + */ +static int +sysctl_peer_port_number(SYSCTL_HANDLER_ARGS) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg1; + int rc, pidx = arg2, peer_port; + + peer_port = ntb_peer_port_number(tc->dev, pidx); + rc = sysctl_handle_int(oidp, &peer_port, 0, req); + if (rc) + device_printf(tc->dev, "Peer port sysctl set failed with err=" + "(%d).\n", rc); + else + tc->peers[pidx].port_no = peer_port; + + return (rc); +} + +static int +sysctl_local_port_number(SYSCTL_HANDLER_ARGS) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg1; + int rc, local_port; + + local_port = ntb_port_number(tc->dev); + rc = sysctl_handle_int(oidp, &local_port, 0, req); + if (rc) + device_printf(tc->dev, "Local port sysctl set failed with err=" + "(%d).\n", rc); + else + tc->port_no = local_port; + + return (rc); +} + +static int +tool_init_peers(struct tool_ctx *tc) +{ + int pidx; + + tc->peer_cnt = ntb_peer_port_count(tc->dev); + tc->peers = malloc(tc->peer_cnt * sizeof(*tc->peers), M_NTB_TOOL, + M_WAITOK | M_ZERO); + if (tc->peers == NULL) + return (ENOMEM); + for (pidx = 0; pidx < tc->peer_cnt; pidx++) { + tc->peers[pidx].pidx = pidx; + tc->peers[pidx].tc = tc; + } + + return (0); +} + +static void +tool_clear_peers(struct tool_ctx *tc) +{ + + free(tc->peers, M_NTB_TOOL); +} + +/* + * Link state sysctl read/write methods + */ +static int +sysctl_link_handle(SYSCTL_HANDLER_ARGS) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg1; + char buf[TOOL_BUF_LEN]; + int rc; + + if (req->newptr == NULL) { + snprintf(buf, 2, "%c", tc->link_status); + + return SYSCTL_OUT(req, buf, 2); + } + + rc = get_ubuf(req, buf); + if (rc) + return (rc); + + if (buf[0] == 'Y') + rc = ntb_link_enable(tc->dev, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); + else if (buf[0] == 'N') + rc = ntb_link_disable(tc->dev); + else + rc = EINVAL; + + sscanf(buf, "%c", &tc->link_status); + + return (0); +} + +static int +sysctl_peer_link_handle(SYSCTL_HANDLER_ARGS) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg1; + int up = 0, pidx = arg2; + char buf[TOOL_BUF_LEN]; + + if (req->newptr) + return (0); + + up = ntb_link_is_up(tc->dev, NULL, NULL); + memset((void *)buf, 0, TOOL_BUF_LEN); + if (up & (1UL << pidx)) + buf[0] = 'Y'; + else + buf[0] = 'N'; + + return SYSCTL_OUT(req, buf, sizeof(buf)); +} + +static int +sysctl_peer_link_event_handle(SYSCTL_HANDLER_ARGS) +{ + struct tool_ctx *tc = (struct tool_ctx *)arg1; + char buf[TOOL_BUF_LEN]; + int rc, pidx = arg2; + uint64_t bits; + + if (req->newptr == NULL) + return read_out(req, tc->link_bits); + + rc = get_ubuf(req, buf); + if (rc) + return (rc); + + sscanf(buf, "0x%jx", &bits); + tc->link_bits = bits; + tc->link_mask = (1ULL << ((pidx) % 64)); + + callout_reset(&tc->link_event_timer, 1, tool_link_event_handler, tc); + return (0); +} + +/* + * Memory windows read/write/setting methods + */ +static void +ntb_tool_load_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct ntb_tool_load_cb_args *cba = (struct ntb_tool_load_cb_args *)arg; + + if (!(cba->error = error)) + cba->addr = segs[0].ds_addr; +} + +static int +sysctl_mw_handle(SYSCTL_HANDLER_ARGS) +{ + struct tool_mw *inmw = (struct tool_mw *)arg1; + char buf[TOOL_BUF_LEN]; + int rc; + + if (req->newptr == NULL) + return tool_mw_read_fn(req, inmw, (char *)inmw->mm_base, + &inmw->mw_cmd_rw, inmw->mw_buf_offset, inmw->mw_buf_size, + "mw"); + + rc = get_ubuf(req, buf); + if (!rc) + return tool_mw_write_fn(oidp, req, inmw, buf, inmw->mm_base, + &inmw->mw_cmd_rw, &inmw->mw_buf_offset, &inmw->mw_buf_size); + + return (rc); +} + +static int +tool_setup_mw(struct tool_ctx *tc, unsigned int pidx, unsigned int widx, + size_t req_size) +{ + struct tool_mw *inmw = &tc->peers[pidx].inmws[widx]; + struct ntb_tool_load_cb_args cba; + int rc; + + if (req_size == 0) + inmw->size = roundup(inmw->phys_size, inmw->xlat_align_size); + else + inmw->size = roundup(req_size, inmw->xlat_align_size); + + device_printf(tc->dev, "mw_size %zi req_size %zi buff %zi\n", + inmw->phys_size, req_size, inmw->size); + + if (bus_dma_tag_create(bus_get_dma_tag(tc->dev), inmw->xlat_align, 0, + inmw->addr_limit, BUS_SPACE_MAXADDR, NULL, NULL, inmw->size, 1, + inmw->size, 0, NULL, NULL, &inmw->dma_tag)) { + device_printf(tc->dev, "Unable to create MW tag of size " + "%zu/%zu\n", inmw->phys_size, inmw->size); + rc = ENOMEM; + goto err_free_dma_var; + } + + if (bus_dmamem_alloc(inmw->dma_tag, (void **)&inmw->virt_addr, + BUS_DMA_WAITOK | BUS_DMA_ZERO, &inmw->dma_map)) { + device_printf(tc->dev, "Unable to allocate MW buffer of size " + "%zu/%zu\n", inmw->phys_size, inmw->size); + rc = ENOMEM; + goto err_free_tag_rem; + } + + if (bus_dmamap_load(inmw->dma_tag, inmw->dma_map, inmw->virt_addr, + inmw->size, ntb_tool_load_cb, &cba, BUS_DMA_NOWAIT) || cba.error) { + device_printf(tc->dev, "Unable to load MW buffer of size " + "%zu/%zu\n", inmw->phys_size, inmw->size); + rc = ENOMEM; + goto err_free_dma; + } + inmw->dma_base = cba.addr; + + rc = ntb_mw_set_trans(tc->dev, widx, inmw->dma_base, inmw->size); + if (rc) + goto err_free_mw; + + return (0); + +err_free_mw: + bus_dmamap_unload(inmw->dma_tag, inmw->dma_map); + +err_free_dma: + bus_dmamem_free(inmw->dma_tag, inmw->virt_addr, inmw->dma_map); + +err_free_tag_rem: + bus_dma_tag_destroy(inmw->dma_tag); + +err_free_dma_var: + inmw->size = 0; + inmw->virt_addr = 0; + inmw->dma_base = 0; + inmw->dma_tag = 0; + inmw->dma_map = 0; + + return (rc); +} + +static void +tool_free_mw(struct tool_ctx *tc, int pidx, int widx) +{ + struct tool_mw *inmw = &tc->peers[pidx].inmws[widx]; + + if (inmw->dma_base) + ntb_mw_clear_trans(tc->dev, widx); + + if (inmw->virt_addr && inmw->dma_tag) { + bus_dmamap_unload(inmw->dma_tag, inmw->dma_map); + bus_dmamem_free(inmw->dma_tag, inmw->virt_addr, inmw->dma_map); + bus_dma_tag_destroy(inmw->dma_tag); + } + + inmw->virt_addr = 0; + inmw->dma_base = 0; + inmw->dma_tag = 0; + inmw->dma_map = 0; + inmw->mm_base = 0; + inmw->size = 0; +} + +static int +tool_mw_trans_read(struct tool_mw *inmw, struct sysctl_req *req) +{ + ssize_t buf_size = 512; + struct sbuf *sb; + int rc = 0; + + sb = sbuf_new_for_sysctl(NULL, NULL, buf_size, req); + if (sb == NULL) { + rc = sb->s_error; + return (rc); + } + + sbuf_printf(sb, "\nInbound MW \t%d\n", inmw->widx); + sbuf_printf(sb, "Port \t%d (%d)\n", + ntb_peer_port_number(inmw->tc->dev, inmw->pidx), inmw->pidx); + sbuf_printf(sb, "Window Address \t%p\n", inmw->mm_base); + sbuf_printf(sb, "DMA Address \t0x%016llx\n", (long long)inmw->dma_base); + sbuf_printf(sb, "Window Size \t0x%016zx[p]\n", inmw->size); + sbuf_printf(sb, "Alignment \t0x%016zx[p]\n", inmw->xlat_align); + sbuf_printf(sb, "Size Alignment \t0x%016zx[p]\n", + inmw->xlat_align_size); + sbuf_printf(sb, "Size Max \t0x%016zx[p]\n", inmw->phys_size); + + rc = sbuf_finish(sb); + sbuf_delete(sb); + + return (rc); +} + +static int +tool_mw_trans_write(struct sysctl_oid *oidp, struct sysctl_req *req, + struct tool_mw *inmw, size_t wsize) +{ + struct tool_ctx *tc = inmw->tc; + int rc = 0; + + if (wsize == 0) + return (EINVAL); + + /* No need to re-setup mw */ + if (inmw->size == wsize) + return (0); + + /* free mw dma buffer */ + if (inmw->size) + tool_free_mw(tc, inmw->pidx, inmw->widx); + + rc = tool_setup_mw(tc, inmw->pidx, inmw->widx, wsize); + + return (rc); +} + +static int +sysctl_mw_trans_handler(SYSCTL_HANDLER_ARGS) +{ + struct tool_mw *inmw = (struct tool_mw *)arg1; + char buf[TOOL_BUF_LEN]; + ssize_t wsize; + int rc; + + if (req->newptr == NULL) + return tool_mw_trans_read(inmw, req); + + rc = get_ubuf(req, buf); + if (rc == 0) { + sscanf(buf, "%zi", &wsize); + return tool_mw_trans_write(oidp, req, inmw, wsize); + } + + return (rc); +} + +static int +sysctl_peer_mw_handle(SYSCTL_HANDLER_ARGS) +{ + struct tool_mw *inmw = (struct tool_mw *)arg1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Aug 16 20:30:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76559ADE72; Fri, 16 Aug 2019 20:30:32 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469FLw2T72z4jvQ; Fri, 16 Aug 2019 20:30:32 +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 338036BB8; Fri, 16 Aug 2019 20:30:32 +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 x7GKUWI6012139; Fri, 16 Aug 2019 20:30:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GKUW9Y012138; Fri, 16 Aug 2019 20:30:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908162030.x7GKUW9Y012138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Aug 2019 20:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351138 - head/sys/modules/ntb/ntb_tool X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/modules/ntb/ntb_tool X-SVN-Commit-Revision: 351138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 20:30:32 -0000 Author: mav Date: Fri Aug 16 20:30:31 2019 New Revision: 351138 URL: https://svnweb.freebsd.org/changeset/base/351138 Log: Forgotten part of r351137. MFC after: 2 weeks Added: head/sys/modules/ntb/ntb_tool/ head/sys/modules/ntb/ntb_tool/Makefile (contents, props changed) Added: head/sys/modules/ntb/ntb_tool/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/ntb/ntb_tool/Makefile Fri Aug 16 20:30:31 2019 (r351138) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/ntb/test + +KMOD = ntb_tool +SRCS = ntb_tool.c +SRCS += device_if.h bus_if.h pci_if.h ntb_if.h + +.include From owner-svn-src-head@freebsd.org Fri Aug 16 20:53:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40BE0AE8EF; Fri, 16 Aug 2019 20:53:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469FsY1100z4l98; Fri, 16 Aug 2019 20:53:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 057B97116; Fri, 16 Aug 2019 20:53:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GKraMt029671; Fri, 16 Aug 2019 20:53:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GKraRe029670; Fri, 16 Aug 2019 20:53:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201908162053.x7GKraRe029670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 16 Aug 2019 20:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351140 - in head: . sys/sys X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: . sys/sys X-SVN-Commit-Revision: 351140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 20:53:37 -0000 Author: delphij Date: Fri Aug 16 20:53:36 2019 New Revision: 351140 URL: https://svnweb.freebsd.org/changeset/base/351140 Log: Delete sys/dir.h which was deprecated since 1997. PR: 21519 Submitted by: Yoshihiro Ota Relnotes: yes Differential Revision: https://reviews.freebsd.org/D20479 Deleted: head/sys/sys/dir.h Modified: head/ObsoleteFiles.inc head/sys/sys/param.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Aug 16 20:49:10 2019 (r351139) +++ head/ObsoleteFiles.inc Fri Aug 16 20:53:36 2019 (r351140) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20190816: dir.h removed from POSIX +OLD_FILES+=usr/include/sys/dir.h # 20190729: gzip'ed a.out support removed OLD_FILES+=usr/include/sys/inflate.h # 20190722: cap_random(3) removed Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Aug 16 20:49:10 2019 (r351139) +++ head/sys/sys/param.h Fri Aug 16 20:53:36 2019 (r351140) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300039 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300040 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Fri Aug 16 21:11:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7B22AF1D8; Fri, 16 Aug 2019 21:11:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469GGR5wH5z4md8; Fri, 16 Aug 2019 21:11:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACEDC747F; Fri, 16 Aug 2019 21:11:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GLBhEF037121; Fri, 16 Aug 2019 21:11:43 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GLBh57037119; Fri, 16 Aug 2019 21:11:43 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908162111.x7GLBh57037119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 16 Aug 2019 21:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351144 - in head/sys: arm64/conf modules/dtb/mv X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm64/conf modules/dtb/mv X-SVN-Commit-Revision: 351144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 21:11:44 -0000 Author: manu Date: Fri Aug 16 21:11:43 2019 New Revision: 351144 URL: https://svnweb.freebsd.org/changeset/base/351144 Log: arm64: Add EspressoBin DTB to the build This will compile the espressobin dts to a dtb file and this will be install in /boot/dtb/marvell/ during installkernel. MFC after: 1 week Modified: head/sys/arm64/conf/GENERIC head/sys/modules/dtb/mv/Makefile Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Fri Aug 16 21:03:55 2019 (r351143) +++ head/sys/arm64/conf/GENERIC Fri Aug 16 21:11:43 2019 (r351144) @@ -326,4 +326,4 @@ options FDT device acpi # DTBs -makeoptions MODULES_EXTRA="dtb/allwinner dtb/rockchip dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/mv dtb/rockchip dtb/rpi" Modified: head/sys/modules/dtb/mv/Makefile ============================================================================== --- head/sys/modules/dtb/mv/Makefile Fri Aug 16 21:03:55 2019 (r351143) +++ head/sys/modules/dtb/mv/Makefile Fri Aug 16 21:11:43 2019 (r351144) @@ -1,7 +1,13 @@ # $FreeBSD$ # All the dts files for Marvell systems we support. + +.if ${MACHINE_ARCH} == "armv7" DTS= \ armada-388-clearfog.dts \ armada-388-gp.dts +.elif ${MACHINE_ARCH} == "aarch64" +DTS= \ + marvell/armada-3720-espressobin.dts +.endif .include From owner-svn-src-head@freebsd.org Fri Aug 16 21:17:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 604F5AF412; Fri, 16 Aug 2019 21:17:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469GPd1rf4z4n5J; Fri, 16 Aug 2019 21:17:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D16D74D0; Fri, 16 Aug 2019 21:17:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GLHukG042570; Fri, 16 Aug 2019 21:17:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GLHukG042568; Fri, 16 Aug 2019 21:17:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201908162117.x7GLHukG042568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 16 Aug 2019 21:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351146 - head/usr.sbin/usbconfig X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/usbconfig X-SVN-Commit-Revision: 351146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 21:17:57 -0000 Author: hselasky Date: Fri Aug 16 21:17:56 2019 New Revision: 351146 URL: https://svnweb.freebsd.org/changeset/base/351146 Log: Implement detach_kernel_driver command in usbconfig(8). Submitted by: Kevin Zheng PR: 239916 MFC after: 1 week Modified: head/usr.sbin/usbconfig/usbconfig.8 head/usr.sbin/usbconfig/usbconfig.c Modified: head/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.8 Fri Aug 16 21:14:27 2019 (r351145) +++ head/usr.sbin/usbconfig/usbconfig.8 Fri Aug 16 21:17:56 2019 (r351146) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 29, 2018 +.Dd August 16, 2019 .Dt USBCONFIG 8 .Os .Sh NAME @@ -52,6 +52,9 @@ Should only be used in conjunction with the unit argum .It Fl d Ar [ugen]. Limit device range to USB devices connected to the given unit and address. The unit and address coordinates may be prefixed by the lowercased word "ugen". +.It Fl i Ar interface_index +Specify interface index as indicated by the command description. +If this argument is not specified a value of zero will be used for the interface index. .It Fl h Show help and available commands. .El @@ -71,7 +74,7 @@ the interface drivers and reducing the power consumpti but without going into power saving mode or detaching from the bus. In some cases, it prevents the device from charging. .It Cm set_alt Ar alt_index -Choose the alternate interface for the USB device. +Choose the alternate interface for the selected interface and USB device. Alternative settings for the current configuration are available as the .Ar bAlternateSetting in @@ -119,6 +122,8 @@ Display the list of interface drivers (such as or .Xr u3g 4 ) currently attached to the device. +.It Cm detach_kernel_driver +Detach kernel driver for the selected interface and USB device. .It Cm suspend Force the device to suspend. .It Cm resume Modified: head/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.c Fri Aug 16 21:14:27 2019 (r351145) +++ head/usr.sbin/usbconfig/usbconfig.c Fri Aug 16 21:17:56 2019 (r351146) @@ -89,6 +89,7 @@ struct options { uint8_t got_add_quirk:1; uint8_t got_dump_string:1; uint8_t got_do_request:1; + uint8_t got_detach_kernel_driver:1; }; struct token { @@ -111,6 +112,7 @@ enum { T_ADD_QUIRK, T_REMOVE_QUIRK, T_SHOW_IFACE_DRIVER, + T_DETACH_KERNEL_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, T_DUMP_ALL_DESC, @@ -144,6 +146,7 @@ static const struct token token[] = { {"remove_dev_quirk_vplh", T_REMOVE_DEVICE_QUIRK, 5}, {"add_quirk", T_ADD_QUIRK, 1}, {"remove_quirk", T_REMOVE_QUIRK, 1}, + {"detach_kernel_driver", T_DETACH_KERNEL_DRIVER, 0}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, {"dump_all_desc", T_DUMP_ALL_DESC, 0}, @@ -284,6 +287,7 @@ usage(void) " remove_dev_quirk_vplh " "\n" " add_quirk " "\n" " remove_quirk " "\n" + " detach_kernel_driver" "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" " dump_all_desc" "\n" @@ -492,6 +496,11 @@ flush_command(struct libusb20_backend *pbe, struct opt err(1, "could not set power ON"); } } + if (opt->got_detach_kernel_driver) { + if (libusb20_dev_detach_kernel_driver(pdev, opt->iface)) { + err(1, "could not detach kernel driver"); + } + } dump_any = (opt->got_dump_all_desc || opt->got_dump_device_desc || @@ -608,6 +617,13 @@ main(int argc, char **argv) opt->quirkname = argv[n + 5]; n += 5; opt->got_remove_device_quirk = 1; + opt->got_any++; + break; + + case T_DETACH_KERNEL_DRIVER: + if (opt->got_detach_kernel_driver) + duplicate_option(argv[n]); + opt->got_detach_kernel_driver = 1; opt->got_any++; break; From owner-svn-src-head@freebsd.org Fri Aug 16 22:34:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCEA4B1A60; Fri, 16 Aug 2019 22:34:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469J5b4cndz4s61; Fri, 16 Aug 2019 22:34:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 672248332; Fri, 16 Aug 2019 22:34:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GMYBZd090046; Fri, 16 Aug 2019 22:34:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GMYA1d090044; Fri, 16 Aug 2019 22:34:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201908162234.x7GMYA1d090044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Aug 2019 22:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351151 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 351151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 22:34:11 -0000 Author: bdrewery Date: Fri Aug 16 22:34:10 2019 New Revision: 351151 URL: https://svnweb.freebsd.org/changeset/base/351151 Log: Rework r339635 to fix .depend.tables.h handling. Avoid touching the tables.h file unless it has changed to avoid unneeded rebuilds. Also revert r350301's explicit dependencies. Reviewed by: emaste MFC after: 2 weeks X-MFC-With: r339635 (kevans request) PR: 238828 Sponsored by: DellEMC Differential Revision: https://reviews.freebsd.org/D21295 Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Fri Aug 16 21:54:12 2019 (r351150) +++ head/lib/libsysdecode/Makefile Fri Aug 16 22:34:10 2019 (r351151) @@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_wait4_options.3 \ sysdecode_mask.3 sysdecode_wait6_options.3 -CLEANFILES= ioctl.c ioctl.c.tmp tables.h tables.h.tmp +CLEANFILES= ioctl.c ioctl.c.tmp tables.h .if defined(COMPAT_32BIT) CPP+= -m32 @@ -123,11 +123,8 @@ CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h -incdir=${SYSROOT:U${DESTDIR}}${INCLUDEDIR} -tables.h: mktables ${incdir}/netinet/in.h ${incdir}/netinet/tcp.h \ - ${incdir}/netinet6/in6.h - sh ${.CURDIR}/mktables ${incdir} ${.TARGET}.tmp && \ - mv -f ${.TARGET}.tmp ${.TARGET} +tables.h: mktables + sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Fri Aug 16 21:54:12 2019 (r351150) +++ head/lib/libsysdecode/mktables Fri Aug 16 22:34:10 2019 (r351151) @@ -43,7 +43,8 @@ fi include_dir=$1 if [ -n "$2" ]; then output_file="$2" - exec > "$output_file" + output_tmp=$(mktemp -u) + exec > "$output_tmp" fi all_headers= @@ -167,9 +168,17 @@ fi # Generate a .depend file for our output file if [ -n "$output_file" ]; then - echo "$output_file: \\" > ".depend.$output_file" - echo "$all_headers" | tr ' ' '\n' | sort -u | - sed -e "s,^, $include_dir/," -e 's,$, \\,' >> \ - ".depend.$output_file" - echo >> ".depend.$output_file" + depend_tmp=$(mktemp -u) + { + echo "$output_file: \\" + echo "$all_headers" | tr ' ' '\n' | sort -u | + sed -e "s,^, $include_dir/," -e 's,$, \\,' + echo + } > "$depend_tmp" + if cmp -s "$output_tmp" "$output_file"; then + rm -f "$output_tmp" "$depend_tmp" + else + mv -f "$depend_tmp" ".depend.${output_file}" + mv -f "$output_tmp" "$output_file" + fi fi From owner-svn-src-head@freebsd.org Fri Aug 16 23:33:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EDD21B336D; Fri, 16 Aug 2019 23:33:44 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469KQJ63Dwz4vjv; Fri, 16 Aug 2019 23:33:44 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9F228DE6; Fri, 16 Aug 2019 23:33:44 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7GNXiWL025221; Fri, 16 Aug 2019 23:33:44 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7GNXiTu025220; Fri, 16 Aug 2019 23:33:44 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201908162333.x7GNXiTu025220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 16 Aug 2019 23:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351152 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 351152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 16 Aug 2019 23:33:45 -0000 Author: erj Date: Fri Aug 16 23:33:44 2019 New Revision: 351152 URL: https://svnweb.freebsd.org/changeset/base/351152 Log: iflib: add iflib_deregister to help cleanup on exit Commit message by Jake: The iflib_register function exists to allocate and setup some common structures used by both iflib_device_register and iflib_pseudo_register. There is no associated cleanup function used to undo the steps taken in this function. Both iflib_device_deregister and iflib_pseudo_deregister have some of the necessary steps scattered in their flow. However, most of the necessary cleanup is not done during the error path of iflib_device_register and iflib_pseudo_register. Some examples of missed cleanup include: the ifp pointer is not free'd during error cleanup the STATE and CTX locks are not destroyed during error cleanup the vlan event handlers are not removed during error cleanup media added to the ifmedia structure is not removed the kobject reference is never deleted Additionally, when initializing the kobject class reference counter is increased even though kobj_init already increases it. This results in the class never being free'd again because the reference count would never hit zero even after all driver instances are unloaded. To aid in proper cleanup, implement an iflib_deregister function that goes through the reverse steps taken by iflib_register. Call this function during the error cleanup for iflib_device_register and iflib_pseudo_register. Additionally call the function in the iflib_device_deregister and iflib_pseudo_deregister functions near the end of their flow. This helps reduce code duplication and ensures that proper steps are taken to cleanup allocations and references in both the regular and error cleanup flows. Signed-off-by: Jacob Keller Submitted by: Jacob Keller Reviewed by: shurd@, erj@ MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D21005 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Aug 16 22:34:10 2019 (r351151) +++ head/sys/net/iflib.c Fri Aug 16 23:33:44 2019 (r351152) @@ -702,6 +702,7 @@ static void iflib_altq_if_start(if_t ifp); static int iflib_altq_if_transmit(if_t ifp, struct mbuf *m); #endif static int iflib_register(if_ctx_t); +static void iflib_deregister(if_ctx_t); static void iflib_init_locked(if_ctx_t ctx); static void iflib_add_device_sysctl_pre(if_ctx_t ctx); static void iflib_add_device_sysctl_post(if_ctx_t ctx); @@ -4790,6 +4791,7 @@ fail_queues: IFDI_DETACH(ctx); fail_unlock: CTX_UNLOCK(ctx); + iflib_deregister(ctx); fail_ctx_free: device_set_softc(ctx->ifc_dev, NULL); if (ctx->ifc_flags & IFC_SC_ALLOCATED) @@ -4983,6 +4985,7 @@ fail_iflib_detach: IFDI_DETACH(ctx); fail_unlock: CTX_UNLOCK(ctx); + iflib_deregister(ctx); fail_ctx_free: free(ctx->ifc_softc, M_IFLIB); free(ctx, M_IFLIB); @@ -4999,15 +5002,7 @@ iflib_pseudo_deregister(if_ctx_t ctx) struct taskqgroup *tqg; iflib_fl_t fl; - /* Unregister VLAN events */ - if (ctx->ifc_vlan_attach_event != NULL) - EVENTHANDLER_DEREGISTER(vlan_config, ctx->ifc_vlan_attach_event); - if (ctx->ifc_vlan_detach_event != NULL) - EVENTHANDLER_DEREGISTER(vlan_unconfig, ctx->ifc_vlan_detach_event); - ether_ifdetach(ifp); - /* ether_ifdetach calls if_qflush - lock must be destroy afterwards*/ - CTX_LOCK_DESTROY(ctx); /* XXX drain any dependent tasks */ tqg = qgroup_if_io_tqg; for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { @@ -5028,10 +5023,11 @@ iflib_pseudo_deregister(if_ctx_t ctx) if (ctx->ifc_vflr_task.gt_uniq != NULL) taskqgroup_detach(tqg, &ctx->ifc_vflr_task); - if_free(ifp); - iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); + + iflib_deregister(ctx); + if (ctx->ifc_flags & IFC_SC_ALLOCATED) free(ctx->ifc_softc, M_IFLIB); free(ctx, M_IFLIB); @@ -5118,19 +5114,19 @@ iflib_device_deregister(if_ctx_t ctx) CTX_UNLOCK(ctx); /* ether_ifdetach calls if_qflush - lock must be destroy afterwards*/ - CTX_LOCK_DESTROY(ctx); - device_set_softc(ctx->ifc_dev, NULL); iflib_free_intr_mem(ctx); bus_generic_detach(dev); - if_free(ifp); iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); + + iflib_deregister(ctx); + + device_set_softc(ctx->ifc_dev, NULL); if (ctx->ifc_flags & IFC_SC_ALLOCATED) free(ctx->ifc_softc, M_IFLIB); unref_ctx_core_offset(ctx); - STATE_LOCK_DESTROY(ctx); free(ctx, M_IFLIB); return (0); } @@ -5377,6 +5373,36 @@ iflib_register(if_ctx_t ctx) iflib_media_change, iflib_media_status); } return (0); +} + +static void +iflib_deregister(if_ctx_t ctx) +{ + if_t ifp = ctx->ifc_ifp; + + /* Remove all media */ + ifmedia_removeall(&ctx->ifc_media); + + /* Unregister VLAN events */ + if (ctx->ifc_vlan_attach_event != NULL) { + EVENTHANDLER_DEREGISTER(vlan_config, ctx->ifc_vlan_attach_event); + ctx->ifc_vlan_attach_event = NULL; + } + if (ctx->ifc_vlan_detach_event != NULL) { + EVENTHANDLER_DEREGISTER(vlan_unconfig, ctx->ifc_vlan_detach_event); + ctx->ifc_vlan_detach_event = NULL; + } + + /* Release kobject reference */ + kobj_delete((kobj_t) ctx, NULL); + + /* Free the ifnet structure */ + if_free(ifp); + + STATE_LOCK_DESTROY(ctx); + + /* ether_ifdetach calls if_qflush - lock must be destroy afterwards*/ + CTX_LOCK_DESTROY(ctx); } static int From owner-svn-src-head@freebsd.org Sat Aug 17 00:10:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57A3CB4552; Sat, 17 Aug 2019 00:10:57 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469LFF1f5Rz3D94; Sat, 17 Aug 2019 00:10:57 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A0BB9479; Sat, 17 Aug 2019 00:10:57 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7H0AuFF043688; Sat, 17 Aug 2019 00:10:56 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H0AueT043687; Sat, 17 Aug 2019 00:10:56 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201908170010.x7H0AueT043687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Sat, 17 Aug 2019 00:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351153 - in head: sbin/ifconfig sys/net X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: in head: sbin/ifconfig sys/net X-SVN-Commit-Revision: 351153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 00:10:57 -0000 Author: erj Date: Sat Aug 17 00:10:56 2019 New Revision: 351153 URL: https://svnweb.freebsd.org/changeset/base/351153 Log: net: Update SFF-8024 definitions and strings with values from rev 4.6 This will let ifconfig -v's SFF eeprom read functionality recognize more module types. Signed-off-by: Eric Joyner Reviewed by: gallatin@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D21041 Modified: head/sbin/ifconfig/sfp.c head/sys/net/sff8472.h Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Fri Aug 16 23:33:44 2019 (r351152) +++ head/sbin/ifconfig/sfp.c Sat Aug 17 00:10:56 2019 (r351153) @@ -69,7 +69,7 @@ struct _nv { const char *find_value(struct _nv *x, int value); const char *find_zero_bit(struct _nv *x, int value, int sz); -/* SFF-8024 Rev. 4.1 Table 4-3: Connector Types */ +/* SFF-8024 Rev. 4.6 Table 4-3: Connector Types */ static struct _nv conn[] = { { 0x00, "Unknown" }, { 0x01, "SC" }, @@ -77,18 +77,23 @@ static struct _nv conn[] = { { 0x03, "Fibre Channel Style 2 copper" }, { 0x04, "BNC/TNC" }, { 0x05, "Fibre Channel coaxial" }, - { 0x06, "FiberJack" }, + { 0x06, "Fiber Jack" }, { 0x07, "LC" }, { 0x08, "MT-RJ" }, { 0x09, "MU" }, { 0x0A, "SG" }, { 0x0B, "Optical pigtail" }, - { 0x0C, "MPO Parallel Optic" }, + { 0x0C, "MPO 1x12 Parallel Optic" }, + { 0x0D, "MPO 2x16 Parallel Optic" }, { 0x20, "HSSDC II" }, { 0x21, "Copper pigtail" }, { 0x22, "RJ45" }, { 0x23, "No separable connector" }, { 0x24, "MXC 2x16" }, + { 0x25, "CS optical connector" }, + { 0x26, "Mini CS optical connector" }, + { 0x27, "MPO 2x12 Parallel Optic" }, + { 0x28, "MPO 1x16 Parallel Optic" }, { 0, NULL } }; @@ -184,9 +189,61 @@ static struct _nv eth_1040g[] = { }; #define SFF_8636_EXT_COMPLIANCE 0x80 -/* SFF-8024 Rev. 4.2 table 4-4: Extended Specification Compliance */ +/* SFF-8024 Rev. 4.6 table 4-4: Extended Specification Compliance */ static struct _nv eth_extended_comp[] = { { 0xFF, "Reserved" }, + { 0x55, "128GFC LW" }, + { 0x54, "128GFC SW" }, + { 0x53, "128GFC EA" }, + { 0x52, "64GFC LW" }, + { 0x51, "64GFC SW" }, + { 0x50, "64GFC EA" }, + { 0x4F, "Reserved" }, + { 0x4E, "Reserved" }, + { 0x4D, "Reserved" }, + { 0x4C, "Reserved" }, + { 0x4B, "Reserved" }, + { 0x4A, "Reserved" }, + { 0x49, "Reserved" }, + { 0x48, "Reserved" }, + { 0x47, "Reserved" }, + { 0x46, "200GBASE-LR4" }, + { 0x45, "50GBASE-LR" }, + { 0x44, "200G 1550nm PSM4" }, + { 0x43, "200GBASE-FR4" }, + { 0x42, "50GBASE-FR or 200GBASE-DR4" }, + { 0x41, "50GBASE-SR/100GBASE-SR2/200GBASE-SR4" }, + { 0x40, "50GBASE-CR/100GBASE-CR2/200GBASE-CR4" }, + { 0x3F, "Reserved" }, + { 0x3E, "Reserved" }, + { 0x3D, "Reserved" }, + { 0x3C, "Reserved" }, + { 0x3B, "Reserved" }, + { 0x3A, "Reserved" }, + { 0x39, "Reserved" }, + { 0x38, "Reserved" }, + { 0x37, "Reserved" }, + { 0x36, "Reserved" }, + { 0x35, "Reserved" }, + { 0x34, "Reserved" }, + { 0x33, "50GAUI/100GAUI-2/200GAUI-4 AOC (BER <2.6e-4)" }, + { 0x32, "50GAUI/100GAUI-2/200GAUI-4 ACC (BER <2.6e-4)" }, + { 0x31, "50GAUI/100GAUI-2/200GAUI-4 AOC (BER <1e-6)" }, + { 0x30, "50GAUI/100GAUI-2/200GAUI-4 ACC (BER <1e-6)" }, + { 0x2F, "Reserved" }, + { 0x2E, "Reserved" }, + { 0x2D, "Reserved" }, + { 0x2C, "Reserved" }, + { 0x2B, "Reserved" }, + { 0x2A, "Reserved" }, + { 0x29, "Reserved" }, + { 0x28, "Reserved" }, + { 0x27, "100G-LR" }, + { 0x26, "100G-FR" }, + { 0x25, "100GBASE-DR" }, + { 0x24, "4WDM-40 MSA" }, + { 0x23, "4WDM-20 MSA" }, + { 0x22, "4WDM-10 MSA" }, { 0x21, "100G PAM4 BiDi" }, { 0x20, "100G SWDM4" }, { 0x1F, "40G SWDM4" }, @@ -207,8 +264,8 @@ static struct _nv eth_extended_comp[] = { { 0x10, "40GBASE-ER4" }, { 0x0F, "Reserved" }, { 0x0E, "Reserved" }, - { 0x0D, "25GBASE-CR CA-N" }, - { 0x0C, "25GBASE-CR CA-S" }, + { 0x0D, "25GBASE-CR CA-25G-N" }, + { 0x0C, "25GBASE-CR CA-25G-S" }, { 0x0B, "100GBASE-CR4 or 25GBASE-CR CA-L" }, { 0x0A, "Reserved" }, { 0x09, "Obsolete" }, Modified: head/sys/net/sff8472.h ============================================================================== --- head/sys/net/sff8472.h Fri Aug 16 23:33:44 2019 (r351152) +++ head/sys/net/sff8472.h Sat Aug 17 00:10:56 2019 (r351153) @@ -379,7 +379,7 @@ enum { /* * Table 3.2 Identifier values. - * Identifier constants has taken from SFF-8024 rev 4.2 table 4.1 + * Identifier constants has taken from SFF-8024 rev 4.6 table 4.1 * (as referenced by table 3.2 footer) * */ enum { @@ -396,10 +396,10 @@ enum { SFF_8024_ID_X2 = 0xA, /* X2 */ SFF_8024_ID_DWDM_SFP = 0xB, /* DWDM-SFP */ SFF_8024_ID_QSFP = 0xC, /* QSFP */ - SFF_8024_ID_QSFPPLUS = 0xD, /* QSFP+ */ + SFF_8024_ID_QSFPPLUS = 0xD, /* QSFP+ or later */ SFF_8024_ID_CXP = 0xE, /* CXP */ - SFF_8024_ID_HD4X = 0xF, /* Shielded Mini Multilane HD 4X */ - SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */ + SFF_8024_ID_HD4X = 0xF, /* Shielded Mini Multilane HD 4X */ + SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */ SFF_8024_ID_QSFP28 = 0x11, /* QSFP28 or later */ SFF_8024_ID_CXP2 = 0x12, /* CXP2 (aka CXP28) */ SFF_8024_ID_CDFP = 0x13, /* CDFP (Style 1/Style 2) */ @@ -408,34 +408,49 @@ enum { SFF_8024_ID_CDFP3 = 0x16, /* CDFP (Style3) */ SFF_8024_ID_MICROQSFP = 0x17, /* microQSFP */ SFF_8024_ID_QSFP_DD = 0x18, /* QSFP-DD 8X Pluggable Transceiver */ - SFF_8024_ID_LAST = SFF_8024_ID_QSFP_DD - }; + SFF_8024_ID_OSFP8X = 0x19, /* OSFP 8X Pluggable Transceiver */ + SFF_8024_ID_SFP_DD = 0x1A, /* SFP-DD 2X Pluggable Transceiver */ + SFF_8024_ID_DSFP = 0x1B, /* DSFP Dual SFF Pluggable Transceiver */ + SFF_8024_ID_X4ML = 0x1C, /* x4 MiniLink/OcuLink */ + SFF_8024_ID_X8ML = 0x1D, /* x8 MiniLink */ + SFF_8024_ID_QSFP_CMIS = 0x1E, /* QSFP+ or later w/ Common Management + Interface Specification */ + SFF_8024_ID_LAST = SFF_8024_ID_QSFP_CMIS +}; -static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = {"Unknown", - "GBIC", - "SFF", - "SFP/SFP+/SFP28", - "XBI", - "Xenpak", - "XFP", - "XFF", - "XFP-E", - "XPAK", - "X2", - "DWDM-SFP/SFP+", - "QSFP", - "QSFP+", - "CXP", - "HD4X", - "HD8X", - "QSFP28", - "CXP2", - "CDFP", - "SMM4", - "SMM8", - "CDFP3", - "microQSFP", - "QSFP-DD"}; +static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = { + "Unknown", + "GBIC", + "SFF", + "SFP/SFP+/SFP28", + "XBI", + "Xenpak", + "XFP", + "XFF", + "XFP-E", + "XPAK", + "X2", + "DWDM-SFP/SFP+", + "QSFP", + "QSFP+", + "CXP", + "HD4X", + "HD8X", + "QSFP28", + "CXP2", + "CDFP", + "SMM4", + "SMM8", + "CDFP3", + "microQSFP", + "QSFP-DD", + "QSFP8X", + "SFP-DD", + "DSFP", + "x4MiniLink/OcuLink", + "x8MiniLink", + "QSFP+(CIMS)" +}; /* Keep compatibility with old definitions */ #define SFF_8472_ID_UNKNOWN SFF_8024_ID_UNKNOWN From owner-svn-src-head@freebsd.org Sat Aug 17 02:35:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46F4AB88EE; Sat, 17 Aug 2019 02:35: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469PSV17nHz3MWl; Sat, 17 Aug 2019 02:35: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 08E53AE48; Sat, 17 Aug 2019 02:35: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 x7H2ZrYF033176; Sat, 17 Aug 2019 02:35:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H2ZrS7033175; Sat, 17 Aug 2019 02:35:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908170235.x7H2ZrS7033175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Aug 2019 02:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351155 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 351155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 02:35:54 -0000 Author: imp Date: Sat Aug 17 02:35:53 2019 New Revision: 351155 URL: https://svnweb.freebsd.org/changeset/base/351155 Log: Move initializations of config earlier. Inizialize global variables earlier in the process. It doesn't matter today, but may in the future if we want to access these lists earlier in config's run. Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Sat Aug 17 01:49:57 2019 (r351154) +++ head/usr.sbin/config/main.c Sat Aug 17 02:35:53 2019 (r351155) @@ -120,6 +120,16 @@ main(int argc, char **argv) printmachine = 0; kernfile = NULL; SLIST_INIT(&includepath); + SLIST_INIT(&cputype); + SLIST_INIT(&mkopt); + SLIST_INIT(&opt); + SLIST_INIT(&rmopts); + STAILQ_INIT(&cfgfiles); + STAILQ_INIT(&dtab); + STAILQ_INIT(&fntab); + STAILQ_INIT(&ftab); + STAILQ_INIT(&hints); + STAILQ_INIT(&envvars); while ((ch = getopt(argc, argv, "Cd:gI:mps:Vx:")) != -1) switch (ch) { case 'C': @@ -197,16 +207,6 @@ main(int argc, char **argv) strlcat(destdir, PREFIX, sizeof(destdir)); } - SLIST_INIT(&cputype); - SLIST_INIT(&mkopt); - SLIST_INIT(&opt); - SLIST_INIT(&rmopts); - STAILQ_INIT(&cfgfiles); - STAILQ_INIT(&dtab); - STAILQ_INIT(&fntab); - STAILQ_INIT(&ftab); - STAILQ_INIT(&hints); - STAILQ_INIT(&envvars); if (yyparse()) exit(3); From owner-svn-src-head@freebsd.org Sat Aug 17 02:36:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 562FFB896E; Sat, 17 Aug 2019 02:36:38 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469PTL1cG5z3Mfn; Sat, 17 Aug 2019 02:36:38 +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 18FADAE49; Sat, 17 Aug 2019 02:36:38 +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 x7H2abge033258; Sat, 17 Aug 2019 02:36:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H2abGi033257; Sat, 17 Aug 2019 02:36:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908170236.x7H2abGi033257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Aug 2019 02:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351156 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 351156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 02:36:38 -0000 Author: imp Date: Sat Aug 17 02:36:37 2019 New Revision: 351156 URL: https://svnweb.freebsd.org/changeset/base/351156 Log: Add nowerror and local to the list of tokens. Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Sat Aug 17 02:35:53 2019 (r351155) +++ head/usr.sbin/config/mkmakefile.c Sat Aug 17 02:36:37 2019 (r351156) @@ -411,6 +411,7 @@ next: * [ dependency "dependency-list"] [ before-depend ] * [ clean "file-list"] [ warning "text warning" ] * [ obj-prefix "file prefix"] + * [ nowerror ] [ local ] */ wd = get_word(fp); if (wd == (char *)EOF) { From owner-svn-src-head@freebsd.org Sat Aug 17 02:36:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70D67B8990; Sat, 17 Aug 2019 02:36:43 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469PTR261bz3Mm0; Sat, 17 Aug 2019 02:36:43 +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 05D67AE4B; Sat, 17 Aug 2019 02:36:43 +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 x7H2ag89033314; Sat, 17 Aug 2019 02:36:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H2agPD033313; Sat, 17 Aug 2019 02:36:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908170236.x7H2agPD033313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Aug 2019 02:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351157 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 351157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 02:36:43 -0000 Author: imp Date: Sat Aug 17 02:36:42 2019 New Revision: 351157 URL: https://svnweb.freebsd.org/changeset/base/351157 Log: Fix small bug in wrapping introduced in r325955. When local support was fixed, it introduced a minor bug in formatting. We don't increment the lpos by enouogh, so lines are a little too long. Adjust to be correct now with variable length srcprefix. Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Sat Aug 17 02:36:37 2019 (r351156) +++ head/usr.sbin/config/mkmakefile.c Sat Aug 17 02:36:42 2019 (r351157) @@ -639,17 +639,16 @@ do_before_depend(FILE *fp) lpos = 15; STAILQ_FOREACH(tp, &ftab, f_next) if (tp->f_flags & BEFORE_DEPEND) { - len = strlen(tp->f_fn); - if ((len = 3 + len) + lpos > 72) { + len = strlen(tp->f_fn) + strlen(tp->f_srcprefix); + if (len + lpos > 72) { lpos = 8; fputs("\\\n\t", fp); } if (tp->f_flags & NO_IMPLCT_RULE) - fprintf(fp, "%s ", tp->f_fn); + lpos += fprintf(fp, "%s ", tp->f_fn); else - fprintf(fp, "%s%s ", tp->f_srcprefix, + lpos += fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn); - lpos += len + 1; } if (lpos != 8) putc('\n', fp); @@ -709,12 +708,11 @@ do_xxfiles(char *tag, FILE *fp) continue; if (strcasecmp(&tp->f_fn[len - slen], suff) != 0) continue; - if ((len = 3 + len) + lpos > 72) { + if (len + strlen(tp->f_srcprefix) + lpos > 72) { lpos = 8; fputs("\\\n\t", fp); } - fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn); - lpos += len + 1; + lpos += fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn); } free(suff); if (lpos != 8) From owner-svn-src-head@freebsd.org Sat Aug 17 03:00:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A25F4B8EC0; Sat, 17 Aug 2019 03:00:59 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Q1R3tmFz3Nbm; Sat, 17 Aug 2019 03:00:59 +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 6873DB1E9; Sat, 17 Aug 2019 03:00:59 +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 x7H30x9O046005; Sat, 17 Aug 2019 03:00:59 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H30xTK046004; Sat, 17 Aug 2019 03:00:59 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908170300.x7H30xTK046004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 03:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351158 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 351158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 03:00:59 -0000 Author: cem Date: Sat Aug 17 03:00:58 2019 New Revision: 351158 URL: https://svnweb.freebsd.org/changeset/base/351158 Log: Linuxkpi: Prevent easy generated ctor name conflicts with prefix Sponsored by: Dell EMC Isilon Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/workqueue.h Sat Aug 17 02:36:42 2019 (r351157) +++ head/sys/compat/linuxkpi/common/include/linux/workqueue.h Sat Aug 17 03:00:58 2019 (r351158) @@ -91,11 +91,12 @@ struct delayed_work { #define DECLARE_DELAYED_WORK(name, fn) \ struct delayed_work name; \ - static void name##_init(void *arg) \ + static void __linux_delayed_ ## name ## _init(void *arg) \ { \ linux_init_delayed_work(&name, fn); \ } \ - SYSINIT(name, SI_SUB_LOCK, SI_ORDER_SECOND, name##_init, NULL) + SYSINIT(name, SI_SUB_LOCK, SI_ORDER_SECOND, \ + __linux_delayed_ ## name##_init, NULL) static inline struct delayed_work * to_delayed_work(struct work_struct *work) From owner-svn-src-head@freebsd.org Sat Aug 17 03:03:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F302B911E; Sat, 17 Aug 2019 03:03:27 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Q4H00Ywz3P7R; Sat, 17 Aug 2019 03:03:27 +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 D6098B3F5; Sat, 17 Aug 2019 03:03:26 +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 x7H33QAd051889; Sat, 17 Aug 2019 03:03:26 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H33Qov051887; Sat, 17 Aug 2019 03:03:26 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908170303.x7H33Qov051887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 03:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351159 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 351159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 03:03:27 -0000 Author: cem Date: Sat Aug 17 03:03:26 2019 New Revision: 351159 URL: https://svnweb.freebsd.org/changeset/base/351159 Log: SDP: SYSCTL_DECL SDP-wide sysctl node in header This allows use of the shared _net_inet_sdp in more than one compilation unit. (Nothing in-tree uses this today, but some of Isilon's out-of-tree SDP enhancements add sysctls below the node.) Sponsored by: Dell EMC Isilon Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Sat Aug 17 03:00:58 2019 (r351158) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Sat Aug 17 03:03:26 2019 (r351159) @@ -454,6 +454,7 @@ struct sdp_sock { #define SDP_LOCK_ASSERT(ssk) rw_assert(&(ssk)->lock, RA_LOCKED) MALLOC_DECLARE(M_SDP); +SYSCTL_DECL(_net_inet_sdp); static inline void tx_sa_reset(struct tx_srcavail_state *tx_sa) { Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sat Aug 17 03:00:58 2019 (r351158) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sat Aug 17 03:03:26 2019 (r351159) @@ -1881,7 +1881,7 @@ next: return (error); } -static SYSCTL_NODE(_net_inet, -1, sdp, CTLFLAG_RW, 0, "SDP"); +SYSCTL_NODE(_net_inet, -1, sdp, CTLFLAG_RW, 0, "SDP"); SYSCTL_PROC(_net_inet_sdp, TCPCTL_PCBLIST, pcblist, CTLFLAG_RD | CTLTYPE_STRUCT, 0, 0, sdp_pcblist, "S,xtcpcb", From owner-svn-src-head@freebsd.org Sat Aug 17 03:05:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13B24B924E; Sat, 17 Aug 2019 03:05:10 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Q6F6TLLz3PJF; Sat, 17 Aug 2019 03:05:09 +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 BA094B407; Sat, 17 Aug 2019 03:05:09 +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 x7H359J8052020; Sat, 17 Aug 2019 03:05:09 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H359w1052019; Sat, 17 Aug 2019 03:05:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908170305.x7H359w1052019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 03:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351160 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 351160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 03:05:10 -0000 Author: cem Date: Sat Aug 17 03:05:09 2019 New Revision: 351160 URL: https://svnweb.freebsd.org/changeset/base/351160 Log: SDP: Include nice string names for raw event numbers in a dbg() Sponsored by: Dell EMC Isilon Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Sat Aug 17 03:03:26 2019 (r351159) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Sat Aug 17 03:05:09 2019 (r351160) @@ -439,7 +439,8 @@ sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_ break; } - sdp_dbg(sk, "event %d done. status %d\n", event->event, rc); + sdp_dbg(sk, "event %s (%d) done. status %d\n", + rdma_event_msg(event->event), event->event, rc); if (rc) { SDP_WLOCK(ssk); From owner-svn-src-head@freebsd.org Sat Aug 17 03:06:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45BBCB92EF; Sat, 17 Aug 2019 03:06:47 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Q870k4sz3PR9; Sat, 17 Aug 2019 03:06:47 +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 EB023B40C; Sat, 17 Aug 2019 03:06:46 +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 x7H36kr4052135; Sat, 17 Aug 2019 03:06:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H36k6V052134; Sat, 17 Aug 2019 03:06:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908170306.x7H36k6V052134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 03:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351161 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 351161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 03:06:47 -0000 Author: cem Date: Sat Aug 17 03:06:46 2019 New Revision: 351161 URL: https://svnweb.freebsd.org/changeset/base/351161 Log: SDP: Also log a nice status string in RX WC error dbg() Sponsored by: Dell EMC Isilon Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Sat Aug 17 03:05:09 2019 (r351160) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Sat Aug 17 03:06:46 2019 (r351161) @@ -481,8 +481,9 @@ sdp_process_rx_wc(struct sdp_sock *ssk, struct ib_wc * if (unlikely(wc->status)) { if (ssk->qp_active && sk) { sdp_dbg(sk, "Recv completion with error. " - "Status %d, vendor: %d\n", - wc->status, wc->vendor_err); + "Status %s (%d), vendor: %d\n", + ib_wc_status_msg(wc->status), wc->status, + wc->vendor_err); sdp_abort(sk); ssk->qp_active = 0; } From owner-svn-src-head@freebsd.org Sat Aug 17 03:07:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF958B9399; Sat, 17 Aug 2019 03:07:41 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Q995zp5z3PYr; Sat, 17 Aug 2019 03:07:41 +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 AB406B410; Sat, 17 Aug 2019 03:07:41 +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 x7H37fRk052232; Sat, 17 Aug 2019 03:07:41 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H37fnv052231; Sat, 17 Aug 2019 03:07:41 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908170307.x7H37fnv052231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 03:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351162 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 351162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 03:07:42 -0000 Author: cem Date: Sat Aug 17 03:07:41 2019 New Revision: 351162 URL: https://svnweb.freebsd.org/changeset/base/351162 Log: SDP: Add a dbg() on QP events Sponsored by: Dell EMC Isilon Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Sat Aug 17 03:06:46 2019 (r351161) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Sat Aug 17 03:07:41 2019 (r351162) @@ -48,6 +48,10 @@ enum { static void sdp_qp_event_handler(struct ib_event *event, void *data) { + struct socket *sk = data; + + sdp_dbg(ssk, "QP Event: %s (%d)", ib_event_msg(event->event), + event->event); } static int @@ -71,6 +75,7 @@ sdp_init_qp(struct socket *sk, struct rdma_cm_id *id) { struct ib_qp_init_attr qp_init_attr = { .event_handler = sdp_qp_event_handler, + .qp_context = sk, .cap.max_send_wr = SDP_TX_SIZE, .cap.max_recv_wr = SDP_RX_SIZE, .sq_sig_type = IB_SIGNAL_REQ_WR, From owner-svn-src-head@freebsd.org Sat Aug 17 03:09:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6EADB942C; Sat, 17 Aug 2019 03:09:03 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469QBl4qWSz3Phl; Sat, 17 Aug 2019 03:09:03 +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 8642CB415; Sat, 17 Aug 2019 03:09:03 +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 x7H393oP052347; Sat, 17 Aug 2019 03:09:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H393u6052346; Sat, 17 Aug 2019 03:09:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908170309.x7H393u6052346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 03:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351163 - head/sys/ofed/include/rdma X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ofed/include/rdma X-SVN-Commit-Revision: 351163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 03:09:03 -0000 Author: cem Date: Sat Aug 17 03:09:03 2019 New Revision: 351163 URL: https://svnweb.freebsd.org/changeset/base/351163 Log: OFED: Fix ib_mad.h ib_user_mad.h include to match new uapi path Sponsored by: Dell EMC Isilon Modified: head/sys/ofed/include/rdma/ib_mad.h Modified: head/sys/ofed/include/rdma/ib_mad.h ============================================================================== --- head/sys/ofed/include/rdma/ib_mad.h Sat Aug 17 03:07:41 2019 (r351162) +++ head/sys/ofed/include/rdma/ib_mad.h Sat Aug 17 03:09:03 2019 (r351163) @@ -44,7 +44,7 @@ #include #include -#include +#include /* Management base versions */ #define IB_MGMT_BASE_VERSION 1 From owner-svn-src-head@freebsd.org Sat Aug 17 06:44:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AFB2BD24D; Sat, 17 Aug 2019 06:44:12 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469Vz01V2dz43L1; Sat, 17 Aug 2019 06:44:12 +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 16402DD15; Sat, 17 Aug 2019 06:44:12 +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 x7H6iBch082252; Sat, 17 Aug 2019 06:44:11 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H6iB4m082250; Sat, 17 Aug 2019 06:44:11 GMT (envelope-from thj@FreeBSD.org) Message-Id: <201908170644.x7H6iB4m082250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Sat, 17 Aug 2019 06:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351165 - head/tests/sys/netpfil/common X-SVN-Group: head X-SVN-Commit-Author: thj X-SVN-Commit-Paths: head/tests/sys/netpfil/common X-SVN-Commit-Revision: 351165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 06:44:12 -0000 Author: thj Date: Sat Aug 17 06:44:11 2019 New Revision: 351165 URL: https://svnweb.freebsd.org/changeset/base/351165 Log: Add basic NAT test for pf, ipf and ipfw Add common firewall NAT tests for pf, ipf and ipfw (using both in-kernel and userspace NAT). Submitted by: Ahsan Barkati Sponsored by: Google, Inc. (GSoC 2019) Reviewed by: kp Approved by: bz (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21199 Added: head/tests/sys/netpfil/common/nat.sh (contents, props changed) Modified: head/tests/sys/netpfil/common/Makefile head/tests/sys/netpfil/common/utils.subr Modified: head/tests/sys/netpfil/common/Makefile ============================================================================== --- head/tests/sys/netpfil/common/Makefile Sat Aug 17 06:06:50 2019 (r351164) +++ head/tests/sys/netpfil/common/Makefile Sat Aug 17 06:44:11 2019 (r351165) @@ -5,9 +5,12 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/common -ATF_TESTS_SH+= pass_block \ +ATF_TESTS_SH+= \ + pass_block \ + nat -${PACKAGE}FILES+= utils.subr \ - runner.subr +${PACKAGE}FILES+= \ + utils.subr \ + runner.subr .include Added: head/tests/sys/netpfil/common/nat.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netpfil/common/nat.sh Sat Aug 17 06:44:11 2019 (r351165) @@ -0,0 +1,156 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Ahsan Barkati +# +# 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$ +# + +. $(atf_get_srcdir)/utils.subr +. $(atf_get_srcdir)/runner.subr + +basic_head() +{ + atf_set descr 'Basic IPv4 NAT test' + atf_set require.user root +} + +basic_body() +{ + firewall=$1 + firewall_init $firewall + nat_init $firewall + + epair_host_nat=$(vnet_mkepair) + epair_client1_nat=$(vnet_mkepair) + epair_client2_nat=$(vnet_mkepair) + + vnet_mkjail nat ${epair_host_nat}b ${epair_client1_nat}a ${epair_client2_nat}a + vnet_mkjail client1 ${epair_client1_nat}b + vnet_mkjail client2 ${epair_client2_nat}b + + ifconfig ${epair_host_nat}a 198.51.100.2/24 up + jexec nat ifconfig ${epair_host_nat}b 198.51.100.1/24 up + + jexec nat ifconfig ${epair_client1_nat}a 192.0.2.1/24 up + jexec client1 ifconfig ${epair_client1_nat}b 192.0.2.2/24 up + + jexec nat ifconfig ${epair_client2_nat}a 192.0.3.1/24 up + jexec client2 ifconfig ${epair_client2_nat}b 192.0.3.2/24 up + + jexec nat sysctl net.inet.ip.forwarding=1 + + jexec client1 route add -net 198.51.100.0/24 192.0.2.1 + jexec client2 route add -net 198.51.100.0/24 192.0.3.1 + + # ping fails without NAT configuration + atf_check -s exit:2 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:2 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 + + firewall_config nat ${firewall} \ + "pf" \ + "nat pass on ${epair_host_nat}b inet from any to any -> (${epair_host_nat}b)" \ + "ipfw" \ + "ipfw -q nat 123 config if ${epair_host_nat}b" \ + "ipfw -q add 1000 nat 123 all from any to any" \ + "ipfnat" \ + "map ${epair_host_nat}b 192.0.3.0/24 -> 0/32" \ + "map ${epair_host_nat}b 192.0.2.0/24 -> 0/32" \ + + + # ping is successful now + atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 + +} + +basic_cleanup() +{ + firewall=$1 + firewall_cleanup $firewall +} + +userspace_nat_head() +{ + atf_set descr 'Nat test for ipfw using userspace natd' + atf_set require.user root +} +userspace_nat_body() +{ + firewall=$1 + firewall_init $firewall + + if ! kldstat -q -m ipdivert; then + atf_skip "This test requires ipdivert module loaded" + fi + + epair_host_nat=$(vnet_mkepair) + epair_client1_nat=$(vnet_mkepair) + epair_client2_nat=$(vnet_mkepair) + + vnet_mkjail nat ${epair_host_nat}b ${epair_client1_nat}a ${epair_client2_nat}a + vnet_mkjail client1 ${epair_client1_nat}b + vnet_mkjail client2 ${epair_client2_nat}b + + ifconfig ${epair_host_nat}a 198.51.100.2/24 up + jexec nat ifconfig ${epair_host_nat}b 198.51.100.1/24 up + + jexec nat ifconfig ${epair_client1_nat}a 192.0.2.1/24 up + jexec client1 ifconfig ${epair_client1_nat}b 192.0.2.2/24 up + + jexec nat ifconfig ${epair_client2_nat}a 192.0.3.1/24 up + jexec client2 ifconfig ${epair_client2_nat}b 192.0.3.2/24 up + + jexec nat sysctl net.inet.ip.forwarding=1 + + jexec client1 route add -net 198.51.100.0/24 192.0.2.1 + jexec client2 route add -net 198.51.100.0/24 192.0.3.1 + # Test the userspace NAT of ipfw + # ping fails without NAT configuration + atf_check -s exit:2 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:2 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 + + firewall_config nat ${firewall} \ + "ipfw" \ + "natd -interface ${epair_host_nat}b" \ + "ipfw -q add divert natd all from any to any via ${epair_host_nat}b" \ + + # ping is successful now + atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 +} + +userspace_nat_cleanup() +{ + firewall=$1 + firewall_cleanup $firewall +} + +setup_tests \ + basic \ + pf \ + ipfw \ + ipfnat \ + userspace_nat \ + ipfw \ No newline at end of file Modified: head/tests/sys/netpfil/common/utils.subr ============================================================================== --- head/tests/sys/netpfil/common/utils.subr Sat Aug 17 06:06:50 2019 (r351164) +++ head/tests/sys/netpfil/common/utils.subr Sat Aug 17 06:44:11 2019 (r351165) @@ -37,7 +37,7 @@ firewall_config() shift while [ $# -gt 0 ]; do - if [ $(is_firewall $fw) -eq 1 ]; then + if [ $(is_firewall "$1") -eq 1 ]; then current_fw="$1" shift filename=${current_fw}.rule @@ -94,13 +94,23 @@ firewall_init() atf_skip "This test requires ipf" fi elif [ ${firewall} == "ipfnat" ]; then - if ! kldstat -q -m ipfw_nat; then - atf_skip "This test requires ipfw_nat" + if ! kldstat -q -m ipfilter; then + atf_skip "This test requires ipf" fi else atf_fail "$fw is not a valid firewall to initialize" fi +} + +nat_init() +{ + firewall=$1 + if [ ${firewall} == "ipfw" ]; then + if ! kldstat -q -m ipfw_nat; then + atf_skip "This test requires ipfw_nat" + fi + fi } is_firewall() @@ -110,4 +120,4 @@ is_firewall() else echo 0 fi -} \ No newline at end of file +} From owner-svn-src-head@freebsd.org Sat Aug 17 06:47:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6D8EBD33A; Sat, 17 Aug 2019 06:47:43 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469W334P9mz43Tw; Sat, 17 Aug 2019 06:47:43 +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 78794DD29; Sat, 17 Aug 2019 06:47:43 +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 x7H6lhXu082454; Sat, 17 Aug 2019 06:47:43 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H6lhxv082453; Sat, 17 Aug 2019 06:47:43 GMT (envelope-from thj@FreeBSD.org) Message-Id: <201908170647.x7H6lhxv082453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Sat, 17 Aug 2019 06:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351166 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: thj X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 351166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 06:47:43 -0000 Author: thj Date: Sat Aug 17 06:47:43 2019 New Revision: 351166 URL: https://svnweb.freebsd.org/changeset/base/351166 Log: Reduce size of EFI_STAGING_SIZE to 32 on arm Reduce the size of the EFI_STAGING area we allocate on arm to 32. On arm SBC such as the NanoPi-NEOLTS the staging area allocation will fail on the 256MB model with a staging size of 64. Reviewed by: bcran, manu Approved by: bz (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21016 Modified: head/stand/efi/loader/copy.c Modified: head/stand/efi/loader/copy.c ============================================================================== --- head/stand/efi/loader/copy.c Sat Aug 17 06:44:11 2019 (r351165) +++ head/stand/efi/loader/copy.c Sat Aug 17 06:47:43 2019 (r351166) @@ -178,6 +178,8 @@ out: #ifndef EFI_STAGING_SIZE #if defined(__amd64__) #define EFI_STAGING_SIZE 100 +#elif defined(__arm__) +#define EFI_STAGING_SIZE 32 #else #define EFI_STAGING_SIZE 64 #endif From owner-svn-src-head@freebsd.org Sat Aug 17 08:29:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CDBFC01C8; Sat, 17 Aug 2019 08:29:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469YJM3ZfBz47y7; Sat, 17 Aug 2019 08:29:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C82AEF99; Sat, 17 Aug 2019 08:29:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7H8TN4g042452; Sat, 17 Aug 2019 08:29:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H8TNbB042451; Sat, 17 Aug 2019 08:29:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201908170829.x7H8TNbB042451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 17 Aug 2019 08:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351167 - head/usr.bin/usbhidctl X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.bin/usbhidctl X-SVN-Commit-Revision: 351167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 08:29:23 -0000 Author: hselasky Date: Sat Aug 17 08:29:22 2019 New Revision: 351167 URL: https://svnweb.freebsd.org/changeset/base/351167 Log: Include item position in report descriptor dump in usbhidctl(1). Submitted by: Kevin Zheng PR: 239918 MFC after: 1 week Modified: head/usr.bin/usbhidctl/usbhid.c Modified: head/usr.bin/usbhidctl/usbhid.c ============================================================================== --- head/usr.bin/usbhidctl/usbhid.c Sat Aug 17 06:47:43 2019 (r351166) +++ head/usr.bin/usbhidctl/usbhid.c Sat Aug 17 08:29:22 2019 (r351167) @@ -202,8 +202,8 @@ dumpitem(const char *label, struct hid_item *h) { if ((h->flags & HIO_CONST) && !verbose) return; - printf("%s rid=%d size=%d count=%d page=%s usage=%s%s%s", label, - h->report_ID, h->report_size, h->report_count, + printf("%s rid=%d pos=%d size=%d count=%d page=%s usage=%s%s%s", label, + h->report_ID, h->pos, h->report_size, h->report_count, hid_usage_page(HID_PAGE(h->usage)), hid_usage_in_page(h->usage), h->flags & HIO_CONST ? " Const" : "", From owner-svn-src-head@freebsd.org Sat Aug 17 09:23:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 004E3C16B7; Sat, 17 Aug 2019 09:23:04 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469ZVH6CnHz4BQQ; Sat, 17 Aug 2019 09:23:03 +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 B889DFA3F; Sat, 17 Aug 2019 09:23:03 +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 x7H9N33W077656; Sat, 17 Aug 2019 09:23:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7H9N3Ta077655; Sat, 17 Aug 2019 09:23:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201908170923.x7H9N3Ta077655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 17 Aug 2019 09:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351168 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 351168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 09:23:04 -0000 Author: avg Date: Sat Aug 17 09:23:03 2019 New Revision: 351168 URL: https://svnweb.freebsd.org/changeset/base/351168 Log: zfs_vget: fix vnode reference count leak in error path If vn_lock() failed, then the function returned the error but the vnode obtained via zfs_zget() was never released. MFC after: 10 days Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Aug 17 08:29:22 2019 (r351167) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Aug 17 09:23:03 2019 (r351168) @@ -2317,8 +2317,11 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t ** if (err == 0) *vpp = ZTOV(zp); ZFS_EXIT(zfsvfs); - if (err == 0) + if (err == 0) { err = vn_lock(*vpp, flags); + if (err != 0) + vrele(*vpp); + } if (err != 0) *vpp = NULL; return (err); From owner-svn-src-head@freebsd.org Sat Aug 17 10:11:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A91EC2650; Sat, 17 Aug 2019 10:11:35 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469bZH0Mq1z4D7m; Sat, 17 Aug 2019 10:11:35 +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 E3EF6182D9; Sat, 17 Aug 2019 10:11:34 +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 x7HABYqP006161; Sat, 17 Aug 2019 10:11:34 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HABYcm006160; Sat, 17 Aug 2019 10:11:34 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908171011.x7HABYcm006160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 10:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351169 - head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 351169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 10:11:35 -0000 Author: cem Date: Sat Aug 17 10:11:34 2019 New Revision: 351169 URL: https://svnweb.freebsd.org/changeset/base/351169 Log: SDP: Fix brain-o from r351162 Lost in translation between different SDP stacks. Reported by: hselasky Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Sat Aug 17 09:23:03 2019 (r351168) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c Sat Aug 17 10:11:34 2019 (r351169) @@ -50,7 +50,7 @@ sdp_qp_event_handler(struct ib_event *event, void *dat { struct socket *sk = data; - sdp_dbg(ssk, "QP Event: %s (%d)", ib_event_msg(event->event), + sdp_dbg(sk, "QP Event: %s (%d)", ib_event_msg(event->event), event->event); } From owner-svn-src-head@freebsd.org Sat Aug 17 14:28:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49605C8D3F; Sat, 17 Aug 2019 14:28:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469jGn0q9sz4QTk; Sat, 17 Aug 2019 14:28:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1B211AFFA; Sat, 17 Aug 2019 14:28:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7HESW1G054861; Sat, 17 Aug 2019 14:28:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HESWZC054860; Sat, 17 Aug 2019 14:28:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908171428.x7HESWZC054860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 17 Aug 2019 14:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351170 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 14:28:33 -0000 Author: asomers Date: Sat Aug 17 14:28:32 2019 New Revision: 351170 URL: https://svnweb.freebsd.org/changeset/base/351170 Log: ping6: Fix dnsdecode() bug introduced by r350859 Revision 350859 removed level of indirection that was needed for setting the caller's `cp' pointer. dnsdecode() uses return value to indicate error or success. It returns pointer to a buffer holding a decompressed DNS name or NULL. The caller uses that value only to find out the result, not for accessing the buffer. We use the return value to propagate the new value of `cp' pointer to the caller instead of using an output argument. Submitted by: Ján Sučan MFC after: 2 weeks MFC-With: 350859 Sponsored by: Google, Inc (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21266 Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Sat Aug 17 10:11:34 2019 (r351169) +++ head/sbin/ping6/ping6.c Sat Aug 17 14:28:32 2019 (r351170) @@ -279,7 +279,7 @@ static void pr_suptypes(struct icmp6_nodeinfo *, size static void pr_nodeaddr(struct icmp6_nodeinfo *, int); static int myechoreply(const struct icmp6_hdr *); static int mynireply(const struct icmp6_nodeinfo *); -static char *dnsdecode(const u_char *, const u_char *, const u_char *, +static const char *dnsdecode(const u_char *, const u_char *, const u_char *, char *, size_t); static void pr_pack(u_char *, int, struct msghdr *); static void pr_exthdrs(struct msghdr *); @@ -1446,10 +1446,26 @@ mynireply(const struct icmp6_nodeinfo *nip) return 0; } -static char * +/* + * Decode a name from a DNS message. + * + * Format of the message is described in RFC 1035 subsection 4.1.4. + * + * Arguments: + * sp - Pointer to a DNS pointer octet or to the first octet of a label + * in the message. + * ep - Pointer to the end of the message (one step past the last octet). + * base - Pointer to the beginning of the message. + * buf - Buffer into which the decoded name will be saved. + * bufsiz - Size of the buffer 'buf'. + * + * Return value: + * Pointer to an octet immediately following the ending zero octet + * of the decoded label, or NULL if an error occured. + */ +static const char * dnsdecode(const u_char *sp, const u_char *ep, const u_char *base, char *buf, size_t bufsiz) - /*base for compressed name*/ { int i; const u_char *cp; @@ -1502,8 +1518,7 @@ dnsdecode(const u_char *sp, const u_char *ep, const u_ if (i != 0) return NULL; /*not terminated*/ cp++; - sp = cp; - return buf; + return cp; } /* @@ -1523,7 +1538,8 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) int hoplim; struct sockaddr *from; int fromlen; - u_char *cp = NULL, *dp, *end = buf + cc; + const u_char *cp = NULL; + u_char *dp, *end = buf + cc; struct in6_pktinfo *pktinfo = NULL; struct timespec tv, tp; struct tv32 tpp; @@ -1696,9 +1712,10 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) } else { i = 0; while (cp < end) { - if (dnsdecode((const u_char *)cp, end, + cp = dnsdecode((const u_char *)cp, end, (const u_char *)(ni + 1), dnsname, - sizeof(dnsname)) == NULL) { + sizeof(dnsname)); + if (cp == NULL) { printf("???"); break; } @@ -2474,8 +2491,9 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end) } printf(", subject=%s", niqcode[ni->ni_code]); cp = (const u_char *)(ni + 1); - if (dnsdecode(cp, end, NULL, dnsname, - sizeof(dnsname)) != NULL) + cp = dnsdecode(cp, end, NULL, dnsname, + sizeof(dnsname)); + if (cp != NULL) printf("(%s)", dnsname); else printf("(invalid)"); From owner-svn-src-head@freebsd.org Sat Aug 17 15:25:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14DFECA153; Sat, 17 Aug 2019 15:25:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469kWy6jbyz4T1R; Sat, 17 Aug 2019 15:25:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7D191BAEB; Sat, 17 Aug 2019 15:25:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7HFP2IA090267; Sat, 17 Aug 2019 15:25:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HFP1kT090263; Sat, 17 Aug 2019 15:25:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908171525.x7HFP1kT090263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 17 Aug 2019 15:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351171 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 351171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 15:25:03 -0000 Author: asomers Date: Sat Aug 17 15:25:01 2019 New Revision: 351171 URL: https://svnweb.freebsd.org/changeset/base/351171 Log: ping: Move in_cksum() to a separate source file This is a preparation step for adding ATF tests of in_cksum(), which has been modified to operate on unaligned data. ping.o cannot be linked to the test executable because both of them contain 'main' symbol. Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21288 Added: head/sbin/ping/utils.c (contents, props changed) head/sbin/ping/utils.h (contents, props changed) Modified: head/sbin/ping/Makefile head/sbin/ping/ping.c Modified: head/sbin/ping/Makefile ============================================================================== --- head/sbin/ping/Makefile Sat Aug 17 14:28:32 2019 (r351170) +++ head/sbin/ping/Makefile Sat Aug 17 15:25:01 2019 (r351171) @@ -5,6 +5,7 @@ PACKAGE=runtime PROG= ping +SRCS= ping.c utils.c MAN= ping.8 BINOWN= root BINMODE=4555 Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Sat Aug 17 14:28:32 2019 (r351170) +++ head/sbin/ping/ping.c Sat Aug 17 15:25:01 2019 (r351171) @@ -99,6 +99,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "utils.h" + #define INADDR_LEN ((int)sizeof(in_addr_t)) #define TIMEVAL_LEN ((int)sizeof(struct tv32)) #define MASK_LEN (ICMP_MASKLEN - ICMP_MINLEN) @@ -209,7 +211,6 @@ static volatile sig_atomic_t siginfo_p; static cap_channel_t *capdns; static void fill(char *, char *); -static u_short in_cksum(u_char *, int); static cap_channel_t *capdns_setup(void); static void check_status(void); static void finish(void) __dead2; @@ -1341,53 +1342,6 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from, s (void)putchar('\n'); (void)fflush(stdout); } -} - -/* - * in_cksum -- - * Checksum routine for Internet Protocol family headers (C Version) - */ -u_short -in_cksum(u_char *addr, int len) -{ - int nleft, sum; - u_char *w; - union { - u_short us; - u_char uc[2]; - } last; - u_short answer; - - nleft = len; - sum = 0; - w = addr; - - /* - * Our algorithm is simple, using a 32 bit accumulator (sum), we add - * sequential 16 bit words to it, and at the end, fold back all the - * carry bits from the top 16 bits into the lower 16 bits. - */ - while (nleft > 1) { - u_short data; - - memcpy(&data, w, sizeof(data)); - sum += data; - w += sizeof(data); - nleft -= sizeof(data); - } - - /* mop up an odd byte, if necessary */ - if (nleft == 1) { - last.uc[0] = *w; - last.uc[1] = 0; - sum += last.us; - } - - /* add back carry outs from top 16 bits to low 16 bits */ - sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */ - sum += (sum >> 16); /* add carry */ - answer = ~sum; /* truncate to 16 bits */ - return(answer); } /* Added: head/sbin/ping/utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ping/utils.c Sat Aug 17 15:25:01 2019 (r351171) @@ -0,0 +1,98 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Mike Muuss. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 +#ifndef lint +static const char copyright[] = +"@(#) Copyright (c) 1989, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; +#endif /* not lint */ + +#ifndef lint +static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; +#endif /* not lint */ +#endif +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "utils.h" + +/* + * in_cksum -- + * Checksum routine for Internet Protocol family headers (C Version) + */ +u_short +in_cksum(u_char *addr, int len) +{ + int nleft, sum; + u_char *w; + union { + u_short us; + u_char uc[2]; + } last; + u_short answer; + + nleft = len; + sum = 0; + w = addr; + + /* + * Our algorithm is simple, using a 32 bit accumulator (sum), we add + * sequential 16 bit words to it, and at the end, fold back all the + * carry bits from the top 16 bits into the lower 16 bits. + */ + while (nleft > 1) { + u_short data; + + memcpy(&data, w, sizeof(data)); + sum += data; + w += sizeof(data); + nleft -= sizeof(data); + } + + /* mop up an odd byte, if necessary */ + if (nleft == 1) { + last.uc[0] = *w; + last.uc[1] = 0; + sum += last.us; + } + + /* add back carry outs from top 16 bits to low 16 bits */ + sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */ + sum += (sum >> 16); /* add carry */ + answer = ~sum; /* truncate to 16 bits */ + return(answer); +} Added: head/sbin/ping/utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ping/utils.h Sat Aug 17 15:25:01 2019 (r351171) @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2019 Jan Sucan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef PING_H +#define PING_H 1 + +#include + +u_short in_cksum(u_char *, int); + +#endif From owner-svn-src-head@freebsd.org Sat Aug 17 17:22:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1D6BCC6CE; Sat, 17 Aug 2019 17:22:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469n754Jwdz4YBV; Sat, 17 Aug 2019 17:22:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7460E1D06B; Sat, 17 Aug 2019 17:22:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7HHM9lS059426; Sat, 17 Aug 2019 17:22:09 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HHM9D7059425; Sat, 17 Aug 2019 17:22:09 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201908171722.x7HHM9D7059425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 17 Aug 2019 17:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351172 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 351172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 17:22:09 -0000 Author: asomers Date: Sat Aug 17 17:22:08 2019 New Revision: 351172 URL: https://svnweb.freebsd.org/changeset/base/351172 Log: ping6: Raise WARNS level to 6 Submitted by: Ján Sučan MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21260 Modified: head/sbin/ping6/Makefile Modified: head/sbin/ping6/Makefile ============================================================================== --- head/sbin/ping6/Makefile Sat Aug 17 15:25:01 2019 (r351171) +++ head/sbin/ping6/Makefile Sat Aug 17 17:22:08 2019 (r351172) @@ -7,7 +7,6 @@ PROG= ping6 MAN= ping6.8 CFLAGS+=-DIPSEC -DKAME_SCOPEID -WARNS?= 3 BINOWN= root BINMODE=4555 From owner-svn-src-head@freebsd.org Sat Aug 17 17:42:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 394CACCB39; Sat, 17 Aug 2019 17:42: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469nZ16snGz4Z77; Sat, 17 Aug 2019 17:42: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 CD7C61D410; Sat, 17 Aug 2019 17:42: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 x7HHg18C070235; Sat, 17 Aug 2019 17:42:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HHg1x5070234; Sat, 17 Aug 2019 17:42:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201908171742.x7HHg1x5070234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 17 Aug 2019 17:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351173 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 351173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 17:42:02 -0000 Author: mjg Date: Sat Aug 17 17:42:01 2019 New Revision: 351173 URL: https://svnweb.freebsd.org/changeset/base/351173 Log: fork: stop skipping < 100 ids on wrap around Code doing this is commented with a claim that these IDs are occupied by daemons, but that's demonstrably false. To an extent the range is used by init and kernel processes (and on sufficiently big machines it indeed is fully populated). On a sample box 40-way box the highest id in the range is 63. On a different one it is 23. Just use the range. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Aug 17 17:22:08 2019 (r351172) +++ head/sys/kern/kern_fork.c Sat Aug 17 17:42:01 2019 (r351173) @@ -258,20 +258,13 @@ fork_findpid(int flags) } mtx_lock(&procid_lock); retry: - /* - * If the process ID prototype has wrapped around, - * restart somewhat above 0, as the low-numbered procs - * tend to include daemons that don't exit. - */ - if (trypid >= pid_max) { - trypid = trypid % pid_max; - if (trypid < 100) - trypid += 100; - } + if (trypid >= pid_max) + trypid = 2; bit_ffc_at(&proc_id_pidmap, trypid, pid_max, &result); if (result == -1) { - trypid = 100; + KASSERT(trypid != 2, ("unexpectedly ran out of IDs")); + trypid = 2; goto retry; } if (bit_test(&proc_id_grpidmap, result) || From owner-svn-src-head@freebsd.org Sat Aug 17 17:56:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABFA7CCE14; Sat, 17 Aug 2019 17:56: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469nv045wcz4ZZQ; Sat, 17 Aug 2019 17:56: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 6A00A1D62A; Sat, 17 Aug 2019 17:56:44 +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 x7HHuilZ077981; Sat, 17 Aug 2019 17:56:44 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HHuiFw077980; Sat, 17 Aug 2019 17:56:44 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201908171756.x7HHuiFw077980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 17 Aug 2019 17:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351174 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 351174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 17:56:44 -0000 Author: mjg Date: Sat Aug 17 17:56:43 2019 New Revision: 351174 URL: https://svnweb.freebsd.org/changeset/base/351174 Log: fork: bump process count before checking for permission to cross the limit The limit is almost never reached. Do the check only on failure to see if we can override it. No change in user-visible behavior. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Aug 17 17:42:01 2019 (r351173) +++ head/sys/kern/kern_fork.c Sat Aug 17 17:56:43 2019 (r351174) @@ -800,9 +800,10 @@ fork1(struct thread *td, struct fork_req *fr) struct proc *p1, *newproc; struct thread *td2; struct vmspace *vm2; + struct ucred *cred; struct file *fp_procdesc; vm_ooffset_t mem_charged; - int error, nprocs_new, ok; + int error, nprocs_new; static int curfail; static struct timeval lastfail; int flags, pages; @@ -973,21 +974,17 @@ fork1(struct thread *td, struct fork_req *fr) /* * Increment the count of procs running with this uid. Don't allow * a nonprivileged user to exceed their current limit. - * - * XXXRW: Can we avoid privilege here if it's not needed? */ - error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT); - if (error == 0) - ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, 0); - else { - ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, - lim_cur(td, RLIMIT_NPROC)); + cred = td->td_ucred; + if (!chgproccnt(cred->cr_ruidinfo, 1, lim_cur(td, RLIMIT_NPROC))) { + if (priv_check_cred(cred, PRIV_PROC_LIMIT) != 0) + goto fail0; + chgproccnt(cred->cr_ruidinfo, 1, 0); } - if (ok) { - do_fork(td, fr, newproc, td2, vm2, fp_procdesc); - return (0); - } + do_fork(td, fr, newproc, td2, vm2, fp_procdesc); + return (0); +fail0: error = EAGAIN; sx_xunlock(&allproc_lock); #ifdef MAC From owner-svn-src-head@freebsd.org Sat Aug 17 18:19:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1917ACD7F7; Sat, 17 Aug 2019 18:19:50 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469pPd6zbBz4bXT; Sat, 17 Aug 2019 18:19:49 +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 D173E1D9B9; Sat, 17 Aug 2019 18:19:49 +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 x7HIJnbZ089692; Sat, 17 Aug 2019 18:19:49 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HIJnAF089691; Sat, 17 Aug 2019 18:19:49 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201908171819.x7HIJnAF089691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 17 Aug 2019 18:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351175 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 351175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 18:19:50 -0000 Author: mjg Date: Sat Aug 17 18:19:49 2019 New Revision: 351175 URL: https://svnweb.freebsd.org/changeset/base/351175 Log: fork: rework locking around do_fork - move allproc lock into the func, it is of no use prior to it - the code would lock p1 and p2 while holding allproc to partially construct it after it gets added to the list. instead we can do the work prior to adding anything. - protect lastpid with procid_lock As a side effect we do less work with allproc held. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Aug 17 17:56:43 2019 (r351174) +++ head/sys/kern/kern_fork.c Sat Aug 17 18:19:49 2019 (r351175) @@ -246,17 +246,24 @@ static int fork_findpid(int flags) { pid_t result; - int trypid; + int trypid, random; + /* + * Avoid calling arc4random with procid_lock held. + */ + random = 0; + if (__predict_false(randompid)) + random = arc4random() % randompid; + + mtx_lock(&procid_lock); + trypid = lastpid + 1; if (flags & RFHIGHPID) { if (trypid < 10) trypid = 10; } else { - if (randompid) - trypid += arc4random() % randompid; + trypid += random; } - mtx_lock(&procid_lock); retry: if (trypid >= pid_max) trypid = 2; @@ -341,33 +348,16 @@ do_fork(struct thread *td, struct fork_req *fr, struct struct vmspace *vm2, struct file *fp_procdesc) { struct proc *p1, *pptr; - int trypid; struct filedesc *fd; struct filedesc_to_leader *fdtol; struct sigacts *newsigacts; - sx_assert(&allproc_lock, SX_XLOCKED); - p1 = td->td_proc; - trypid = fork_findpid(fr->fr_flags); - p2->p_state = PRS_NEW; /* protect against others */ - p2->p_pid = trypid; - AUDIT_ARG_PID(p2->p_pid); - LIST_INSERT_HEAD(&allproc, p2, p_list); - allproc_gen++; - sx_xlock(PIDHASHLOCK(p2->p_pid)); - LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash); - sx_xunlock(PIDHASHLOCK(p2->p_pid)); - PROC_LOCK(p2); PROC_LOCK(p1); - - sx_xunlock(&allproc_lock); - bcopy(&p1->p_startcopy, &p2->p_startcopy, __rangeof(struct proc, p_startcopy, p_endcopy)); pargs_hold(p2->p_args); - PROC_UNLOCK(p1); bzero(&p2->p_startzero, @@ -376,8 +366,19 @@ do_fork(struct thread *td, struct fork_req *fr, struct /* Tell the prison that we exist. */ prison_proc_hold(p2->p_ucred->cr_prison); - PROC_UNLOCK(p2); + p2->p_state = PRS_NEW; /* protect against others */ + p2->p_pid = fork_findpid(fr->fr_flags); + AUDIT_ARG_PID(p2->p_pid); + sx_xlock(&allproc_lock); + LIST_INSERT_HEAD(&allproc, p2, p_list); + allproc_gen++; + sx_xunlock(&allproc_lock); + + sx_xlock(PIDHASHLOCK(p2->p_pid)); + LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash); + sx_xunlock(PIDHASHLOCK(p2->p_pid)); + tidhash_add(td2); /* @@ -969,8 +970,6 @@ fork1(struct thread *td, struct fork_req *fr) newproc->p_klist = knlist_alloc(&newproc->p_mtx); STAILQ_INIT(&newproc->p_ktr); - sx_xlock(&allproc_lock); - /* * Increment the count of procs running with this uid. Don't allow * a nonprivileged user to exceed their current limit. @@ -986,7 +985,6 @@ fork1(struct thread *td, struct fork_req *fr) return (0); fail0: error = EAGAIN; - sx_xunlock(&allproc_lock); #ifdef MAC mac_proc_destroy(newproc); #endif From owner-svn-src-head@freebsd.org Sat Aug 17 18:54:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B41CE1DA; Sat, 17 Aug 2019 18:54:08 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469q9D4xrPz4csf; Sat, 17 Aug 2019 18:54:08 +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 8C7521E0F4; Sat, 17 Aug 2019 18:54:08 +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 x7HIs8hU013384; Sat, 17 Aug 2019 18:54:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HIs8bn013381; Sat, 17 Aug 2019 18:54:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201908171854.x7HIs8bn013381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 17 Aug 2019 18:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351176 - in head/sys/ofed: drivers/infiniband/core drivers/infiniband/ulp/sdp include/rdma X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/ofed: drivers/infiniband/core drivers/infiniband/ulp/sdp include/rdma X-SVN-Commit-Revision: 351176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 18:54:08 -0000 Author: cem Date: Sat Aug 17 18:54:07 2019 New Revision: 351176 URL: https://svnweb.freebsd.org/changeset/base/351176 Log: OFED: Unbreak SDP support in ibcore This regression was introduced in the r326169 Linux v4.9 Infiniband upgrade. Restore the functionality. Reviewed by: hselasky Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21298 Added: head/sys/ofed/include/rdma/rdma_sdp.h (contents, props changed) Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Sat Aug 17 18:19:49 2019 (r351175) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Sat Aug 17 18:54:07 2019 (r351176) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -111,6 +112,7 @@ EXPORT_SYMBOL(rdma_event_msg); static int cma_check_linklocal(struct rdma_dev_addr *, struct sockaddr *); static void cma_add_one(struct ib_device *device); static void cma_remove_one(struct ib_device *device, void *client_data); +static enum rdma_port_space rdma_ps_from_service_id(__be64 service_id); static struct ib_client cma_client = { .name = "cma", @@ -130,6 +132,7 @@ struct cma_pernet { struct idr udp_ps; struct idr ipoib_ps; struct idr ib_ps; + struct idr sdp_ps; }; VNET_DEFINE(struct cma_pernet, cma_pernet); @@ -158,6 +161,8 @@ static struct idr *cma_pernet_idr(struct vnet *net, en return &pernet->ipoib_ps; case RDMA_PS_IB: return &pernet->ib_ps; + case RDMA_PS_SDP: + return &pernet->sdp_ps; default: return NULL; } @@ -354,14 +359,6 @@ struct iboe_mcast_work { struct cma_multicast *mc; }; -union cma_ip_addr { - struct in6_addr ip6; - struct { - __be32 pad[3]; - __be32 addr; - } ip4; -}; - struct cma_hdr { u8 cma_version; u8 ip_version; /* IP version: 7:4 */ @@ -371,6 +368,7 @@ struct cma_hdr { }; #define CMA_VERSION 0x00 +#define SDP_MAJ_VERSION 0x2 struct cma_req_info { struct ib_device *device; @@ -428,6 +426,21 @@ static inline void cma_set_ip_ver(struct cma_hdr *hdr, hdr->ip_version = (ip_ver << 4) | (hdr->ip_version & 0xF); } +static inline u8 sdp_get_majv(u8 sdp_version) +{ + return sdp_version >> 4; +} + +static inline u8 sdp_get_ip_ver(const struct sdp_hh *hh) +{ + return hh->ipv_cap >> 4; +} + +static inline void sdp_set_ip_ver(struct sdp_hh *hh, u8 ip_ver) +{ + hh->ipv_cap = (ip_ver << 4) | (hh->ipv_cap & 0xF); +} + static int cma_igmp_send(struct net_device *ndev, const union ib_gid *mgid, bool join) { int retval; @@ -1177,6 +1190,70 @@ static u16 cma_port_from_service_id(__be64 service_id) return (u16)be64_to_cpu(service_id); } +static int sdp_save_ip_info(struct sockaddr *src_addr, + struct sockaddr *dst_addr, + const struct sdp_hh *hdr, + __be64 service_id) +{ + __be16 local_port; + + BUG_ON(src_addr == NULL || dst_addr == NULL); + + if (sdp_get_majv(hdr->majv_minv) != SDP_MAJ_VERSION) + return -EINVAL; + + local_port = htons(cma_port_from_service_id(service_id)); + + switch (sdp_get_ip_ver(hdr)) { + case 4: { + struct sockaddr_in *s4, *d4; + + s4 = (void *)src_addr; + d4 = (void *)dst_addr; + + *s4 = (struct sockaddr_in) { + .sin_len = sizeof(*s4), + .sin_family = AF_INET, + .sin_addr.s_addr = hdr->dst_addr.ip4.addr, + .sin_port = local_port, + }; + *d4 = (struct sockaddr_in) { + .sin_len = sizeof(*d4), + .sin_family = AF_INET, + .sin_addr.s_addr = hdr->src_addr.ip4.addr, + .sin_port = hdr->port, + }; + break; + } + case 6: { + struct sockaddr_in6 *s6, *d6; + + s6 = (void *)src_addr; + d6 = (void *)dst_addr; + + *s6 = (struct sockaddr_in6) { + .sin6_len = sizeof(*s6), + .sin6_family = AF_INET6, + .sin6_addr = hdr->dst_addr.ip6, + .sin6_port = local_port, + }; + *d6 = (struct sockaddr_in6) { + .sin6_len = sizeof(*d6), + .sin6_family = AF_INET6, + .sin6_addr = hdr->src_addr.ip6, + .sin6_port = hdr->port, + }; + cma_ip6_clear_scope_id(&s6->sin6_addr); + cma_ip6_clear_scope_id(&d6->sin6_addr); + break; + } + default: + return -EAFNOSUPPORT; + } + + return 0; +} + static int cma_save_ip_info(struct sockaddr *src_addr, struct sockaddr *dst_addr, struct ib_cm_event *ib_event, @@ -1185,6 +1262,10 @@ static int cma_save_ip_info(struct sockaddr *src_addr, struct cma_hdr *hdr; __be16 port; + if (rdma_ps_from_service_id(service_id) == RDMA_PS_SDP) + return sdp_save_ip_info(src_addr, dst_addr, + ib_event->private_data, service_id); + hdr = ib_event->private_data; if (hdr->cma_version != CMA_VERSION) return -EINVAL; @@ -1462,9 +1543,44 @@ static enum rdma_port_space rdma_ps_from_service_id(__ return (be64_to_cpu(service_id) >> 16) & 0xffff; } +static bool sdp_match_private_data(struct rdma_id_private *id_priv, + const struct sdp_hh *hdr, + struct sockaddr *addr) +{ + __be32 ip4_addr; + struct in6_addr ip6_addr; + + switch (addr->sa_family) { + case AF_INET: + ip4_addr = ((struct sockaddr_in *)addr)->sin_addr.s_addr; + if (sdp_get_ip_ver(hdr) != 4) + return false; + if (!cma_any_addr(addr) && + hdr->dst_addr.ip4.addr != ip4_addr) + return false; + break; + case AF_INET6: + ip6_addr = ((struct sockaddr_in6 *)addr)->sin6_addr; + if (sdp_get_ip_ver(hdr) != 6) + return false; + cma_ip6_clear_scope_id(&ip6_addr); + if (!cma_any_addr(addr) && + memcmp(&hdr->dst_addr.ip6, &ip6_addr, sizeof(ip6_addr))) + return false; + break; + case AF_IB: + return true; + default: + return false; + } + + return true; +} + static bool cma_match_private_data(struct rdma_id_private *id_priv, - const struct cma_hdr *hdr) + const void *vhdr) { + const struct cma_hdr *hdr = vhdr; struct sockaddr *addr = cma_src_addr(id_priv); __be32 ip4_addr; struct in6_addr ip6_addr; @@ -1472,6 +1588,9 @@ static bool cma_match_private_data(struct rdma_id_priv if (cma_any_addr(addr) && !id_priv->afonly) return true; + if (id_priv->id.ps == RDMA_PS_SDP) + return sdp_match_private_data(id_priv, vhdr, addr); + switch (addr->sa_family) { case AF_INET: ip4_addr = ((struct sockaddr_in *)addr)->sin_addr.s_addr; @@ -1522,11 +1641,20 @@ static bool cma_match_net_dev(const struct rdma_cm_id { const struct rdma_addr *addr = &id->route.addr; - if (!net_dev) + if (!net_dev) { + if (id->port_num && id->port_num != port_num) + return false; + + if (id->ps == RDMA_PS_SDP) { + if (addr->src_addr.ss_family == AF_INET || + addr->src_addr.ss_family == AF_INET6) + return true; + return false; + } /* This request is an AF_IB request or a RoCE request */ - return (!id->port_num || id->port_num == port_num) && - (addr->src_addr.ss_family == AF_IB || - cma_protocol_roce_dev_port(id->device, port_num)); + return addr->src_addr.ss_family == AF_IB || + cma_protocol_roce_dev_port(id->device, port_num); + } return !addr->dev_addr.bound_dev_if || (net_eq(dev_net(net_dev), addr->dev_addr.net) && @@ -1576,6 +1704,11 @@ static struct rdma_id_private *cma_id_from_event(struc if (err) return ERR_PTR(err); + if (rdma_ps_from_service_id(cm_id->service_id) == RDMA_PS_SDP) { + *net_dev = NULL; + goto there_is_no_net_dev; + } + *net_dev = cma_get_net_dev(ib_event, &req); if (IS_ERR(*net_dev)) { if (PTR_ERR(*net_dev) == -EAFNOSUPPORT) { @@ -1586,6 +1719,7 @@ static struct rdma_id_private *cma_id_from_event(struc } } +there_is_no_net_dev: bind_list = cma_ps_find(*net_dev ? dev_net(*net_dev) : &init_net, rdma_ps_from_service_id(req.service_id), cma_port_from_service_id(req.service_id)); @@ -1600,7 +1734,11 @@ static struct rdma_id_private *cma_id_from_event(struc static inline int cma_user_data_offset(struct rdma_id_private *id_priv) { - return cma_family(id_priv) == AF_IB ? 0 : sizeof(struct cma_hdr); + if (cma_family(id_priv) == AF_IB) + return 0; + if (id_priv->id.ps == RDMA_PS_SDP) + return 0; + return sizeof(struct cma_hdr); } static void cma_cancel_route(struct rdma_id_private *id_priv) @@ -1769,6 +1907,13 @@ reject: return ret; } +static int sdp_verify_rep(const struct sdp_hah *data) +{ + if (sdp_get_majv(data->majv_minv) != SDP_MAJ_VERSION) + return -EINVAL; + return 0; +} + static void cma_set_rep_event_data(struct rdma_cm_event *event, struct ib_cm_rep_event_param *rep_data, void *private_data) @@ -1804,12 +1949,20 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, stru event.status = -ETIMEDOUT; break; case IB_CM_REP_RECEIVED: - if (id_priv->id.qp) { - event.status = cma_rep_recv(id_priv); - event.event = event.status ? RDMA_CM_EVENT_CONNECT_ERROR : - RDMA_CM_EVENT_ESTABLISHED; + if (id_priv->id.ps == RDMA_PS_SDP) { + event.status = sdp_verify_rep(ib_event->private_data); + if (event.status) + event.event = RDMA_CM_EVENT_CONNECT_ERROR; + else + event.event = RDMA_CM_EVENT_CONNECT_RESPONSE; } else { - event.event = RDMA_CM_EVENT_CONNECT_RESPONSE; + if (id_priv->id.qp) { + event.status = cma_rep_recv(id_priv); + event.event = event.status ? RDMA_CM_EVENT_CONNECT_ERROR : + RDMA_CM_EVENT_ESTABLISHED; + } else { + event.event = RDMA_CM_EVENT_CONNECT_RESPONSE; + } } cma_set_rep_event_data(&event, &ib_event->param.rep_rcvd, ib_event->private_data); @@ -3105,6 +3258,7 @@ static enum rdma_port_space cma_select_inet_ps( case RDMA_PS_UDP: case RDMA_PS_IPOIB: case RDMA_PS_IB: + case RDMA_PS_SDP: return id_priv->id.ps; default: @@ -3293,10 +3447,49 @@ err1: } EXPORT_SYMBOL(rdma_bind_addr); +static int sdp_format_hdr(struct sdp_hh *sdp_hdr, struct rdma_id_private *id_priv) +{ + /* + * XXXCEM: CMA just sets the version itself rather than relying on + * passed in packet to have the major version set. Should we? + */ + if (sdp_get_majv(sdp_hdr->majv_minv) != SDP_MAJ_VERSION) + return -EINVAL; + + if (cma_family(id_priv) == AF_INET) { + struct sockaddr_in *src4, *dst4; + + src4 = (struct sockaddr_in *) cma_src_addr(id_priv); + dst4 = (struct sockaddr_in *) cma_dst_addr(id_priv); + + sdp_set_ip_ver(sdp_hdr, 4); + sdp_hdr->src_addr.ip4.addr = src4->sin_addr.s_addr; + sdp_hdr->dst_addr.ip4.addr = dst4->sin_addr.s_addr; + sdp_hdr->port = src4->sin_port; + } else if (cma_family(id_priv) == AF_INET6) { + struct sockaddr_in6 *src6, *dst6; + + src6 = (struct sockaddr_in6 *) cma_src_addr(id_priv); + dst6 = (struct sockaddr_in6 *) cma_dst_addr(id_priv); + + sdp_set_ip_ver(sdp_hdr, 6); + sdp_hdr->src_addr.ip6 = src6->sin6_addr; + sdp_hdr->dst_addr.ip6 = dst6->sin6_addr; + sdp_hdr->port = src6->sin6_port; + cma_ip6_clear_scope_id(&sdp_hdr->src_addr.ip6); + cma_ip6_clear_scope_id(&sdp_hdr->dst_addr.ip6); + } else + return -EAFNOSUPPORT; + return 0; +} + static int cma_format_hdr(void *hdr, struct rdma_id_private *id_priv) { struct cma_hdr *cma_hdr; + if (id_priv->id.ps == RDMA_PS_SDP) + return sdp_format_hdr(hdr, id_priv); + cma_hdr = hdr; cma_hdr->cma_version = CMA_VERSION; if (cma_family(id_priv) == AF_INET) { @@ -4384,6 +4577,7 @@ static void cma_init_vnet(void *arg) idr_init(&pernet->udp_ps); idr_init(&pernet->ipoib_ps); idr_init(&pernet->ib_ps); + idr_init(&pernet->sdp_ps); } VNET_SYSINIT(cma_init_vnet, SI_SUB_OFED_MODINIT - 1, SI_ORDER_FIRST, cma_init_vnet, NULL); @@ -4395,6 +4589,7 @@ static void cma_destroy_vnet(void *arg) idr_destroy(&pernet->udp_ps); idr_destroy(&pernet->ipoib_ps); idr_destroy(&pernet->ib_ps); + idr_destroy(&pernet->sdp_ps); } VNET_SYSUNINIT(cma_destroy_vnet, SI_SUB_OFED_MODINIT - 1, SI_ORDER_SECOND, cma_destroy_vnet, NULL); Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Sat Aug 17 18:19:49 2019 (r351175) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Sat Aug 17 18:54:07 2019 (r351176) @@ -53,6 +53,7 @@ #include #include #include +#include #ifdef SDP_DEBUG #define CONFIG_INFINIBAND_SDP_DEBUG @@ -187,49 +188,6 @@ enum { SDP_NEW_SEG = -2, SDP_DO_WAIT_MEM = -1 }; - -struct sdp_bsdh { - u8 mid; - u8 flags; - __u16 bufs; - __u32 len; - __u32 mseq; - __u32 mseq_ack; -} __attribute__((__packed__)); - -union cma_ip_addr { - struct in6_addr ip6; - struct { - __u32 pad[3]; - __u32 addr; - } ip4; -} __attribute__((__packed__)); - -/* TODO: too much? Can I avoid having the src/dst and port here? */ -struct sdp_hh { - struct sdp_bsdh bsdh; - u8 majv_minv; - u8 ipv_cap; - u8 rsvd1; - u8 max_adverts; - __u32 desremrcvsz; - __u32 localrcvsz; - __u16 port; - __u16 rsvd2; - union cma_ip_addr src_addr; - union cma_ip_addr dst_addr; - u8 rsvd3[IB_CM_REQ_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 48]; -} __attribute__((__packed__)); - -struct sdp_hah { - struct sdp_bsdh bsdh; - u8 majv_minv; - u8 ipv_cap; - u8 rsvd1; - u8 ext_max_adverts; - __u32 actrcvsz; - u8 rsvd2[IB_CM_REP_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 8]; -} __attribute__((__packed__)); struct sdp_rrch { __u32 len; Added: head/sys/ofed/include/rdma/rdma_sdp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ofed/include/rdma/rdma_sdp.h Sat Aug 17 18:54:07 2019 (r351176) @@ -0,0 +1,158 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Isilon Systems, LLC. + * + * 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_OFED_INCLUDE_RDMA_RDMA_SDP_H_ +#define _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_ + +#include +#include + +#include + +union cma_ip_addr { + struct in6_addr ip6; + struct { + __be32 pad[3]; + __be32 addr; + } ip4; +}; + +struct sdp_bsdh { + u8 mid; + u8 flags; + __u16 bufs; + __u32 len; + __u32 mseq; + __u32 mseq_ack; +} __packed; + +struct sdp_hh { + struct sdp_bsdh bsdh; + u8 majv_minv; + u8 ipv_cap; + u8 rsvd1; + u8 max_adverts; + __u32 desremrcvsz; + __u32 localrcvsz; + __u16 port; + __u16 rsvd2; + union cma_ip_addr src_addr; + union cma_ip_addr dst_addr; + u8 rsvd3[IB_CM_REQ_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 48]; +} __packed; + +struct sdp_hah { + struct sdp_bsdh bsdh; + u8 majv_minv; + u8 ipv_cap; + u8 rsvd1; + u8 ext_max_adverts; + __u32 actrcvsz; + u8 rsvd2[IB_CM_REP_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 8]; +} __packed; + +#endif /* _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_ */ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Isilon Systems, LLC. + * + * 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. + */ + +#ifndef _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_ +#define _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_ + +#include +#include + +#include + +union cma_ip_addr { + struct in6_addr ip6; + struct { + __be32 pad[3]; + __be32 addr; + } ip4; +}; + +struct sdp_bsdh { + u8 mid; + u8 flags; + __u16 bufs; + __u32 len; + __u32 mseq; + __u32 mseq_ack; +} __packed; + +struct sdp_hh { + struct sdp_bsdh bsdh; + u8 majv_minv; + u8 ipv_cap; + u8 rsvd1; + u8 max_adverts; + __u32 desremrcvsz; + __u32 localrcvsz; + __u16 port; + __u16 rsvd2; + union cma_ip_addr src_addr; + union cma_ip_addr dst_addr; + u8 rsvd3[IB_CM_REQ_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 48]; +} __packed; + +struct sdp_hah { + struct sdp_bsdh bsdh; + u8 majv_minv; + u8 ipv_cap; + u8 rsvd1; + u8 ext_max_adverts; + __u32 actrcvsz; + u8 rsvd2[IB_CM_REP_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 8]; +} __packed; + +#endif /* _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_ */ From owner-svn-src-head@freebsd.org Sat Aug 17 19:05:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78B88CE5A9; Sat, 17 Aug 2019 19:05:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469qQ02fNwz4dPm; Sat, 17 Aug 2019 19:05:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39CDE1E2D5; Sat, 17 Aug 2019 19:05:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7HJ5CPU019207; Sat, 17 Aug 2019 19:05:12 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HJ5C0K019206; Sat, 17 Aug 2019 19:05:12 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908171905.x7HJ5C0K019206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 17 Aug 2019 19:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351177 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 351177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 19:05:12 -0000 Author: manu Date: Sat Aug 17 19:05:11 2019 New Revision: 351177 URL: https://svnweb.freebsd.org/changeset/base/351177 Log: Revert r351129 the point of syscon node is to avoid multiple device driver reading/writing to the same area. Reported by: ian Modified: head/sys/dev/fdt/simple_mfd.c Modified: head/sys/dev/fdt/simple_mfd.c ============================================================================== --- head/sys/dev/fdt/simple_mfd.c Sat Aug 17 18:54:07 2019 (r351176) +++ head/sys/dev/fdt/simple_mfd.c Sat Aug 17 19:05:11 2019 (r351177) @@ -187,7 +187,7 @@ simple_mfd_attach(device_t dev) if (ofw_bus_is_compatible(dev, "syscon")) { sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE | RF_SHAREABLE); + RF_ACTIVE); if (sc->mem_res == NULL) { device_printf(dev, "Cannot allocate memory resource\n"); From owner-svn-src-head@freebsd.org Sat Aug 17 19:06:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E4E4CE632; Sat, 17 Aug 2019 19:06:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469qR23jzJz4dXR; Sat, 17 Aug 2019 19:06:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FBE91E2D6; Sat, 17 Aug 2019 19:06:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7HJ66jN019300; Sat, 17 Aug 2019 19:06:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7HJ66ff019299; Sat, 17 Aug 2019 19:06:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908171906.x7HJ66ff019299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 17 Aug 2019 19:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351178 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 351178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, 17 Aug 2019 19:06:06 -0000 Author: manu Date: Sat Aug 17 19:06:05 2019 New Revision: 351178 URL: https://svnweb.freebsd.org/changeset/base/351178 Log: Revert r351130 This driver should use the syscon handle exposed by the parent simple-mfd one. Modified: head/sys/arm/mv/a37x0_gpio.c Modified: head/sys/arm/mv/a37x0_gpio.c ============================================================================== --- head/sys/arm/mv/a37x0_gpio.c Sat Aug 17 19:05:11 2019 (r351177) +++ head/sys/arm/mv/a37x0_gpio.c Sat Aug 17 19:06:05 2019 (r351178) @@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" static struct resource_spec a37x0_gpio_res_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE | RF_SHAREABLE }, /* Pinctl / GPIO */ - { SYS_RES_MEMORY, 1, RF_ACTIVE | RF_SHAREABLE }, /* Interrupts control */ + { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Pinctl / GPIO */ + { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* Interrupts control */ { -1, 0, 0 } };